Keep Dreaming

꿈꾸기를 멈추지 말자

Android NDK build 중 아래와 같은 에러를 접하는 경우가 종종 있다.

$ ndk-build NDK_APPLICATION_MK=”Application.mk”
SharedLibrary  : libxxx.so
C:/Android/android-ndk-r7b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi-v7a/libg
nustl_static.a: No such file: Permission denied
collect2: ld returned 1 exit status
make: *** [obj/local/armeabi-v7a/libvideotext.so] Error 1

이것은 android NDK를 windows 에서 설치하면서 permission이 설정되지 않아서 생긴 문제라서 해당 파일의 permission을 풀어주면 된다.

풀어주고 나서 clean-rebuild 잊지말것!!

개발중 임의로 백업해둔 파일 및 테스트 파일등등 수많은 폴더와 파일들이 존재한다.

이런것들이 HDD를 차지하고 있으면 여기저기 성능에 영향을 주기 마련이다.

Windows에서 파일 및 폴더를 빠르게 삭제하기 위한 방법에 관한 글이다.

  1. Dos command를 이용한다.

여기서 핵심은 del 명령어와 rmdir명령어를 같이 사용하는 것이다. 일반적으로 디렉토리 전체를 삭제하려면 rmdir을 사용하는데, del+rmdir을 사용하는 것이 이상적이라고 한다.

The worst way is to send to Recycle Bin: you still need to delete them. Next worst is shift+delete with Windows Explorer: it wastes loads of time checking the contents before starting deleting anything.

Next best is to use rmdir /s/q foldername from the command line. del /f/s/q foldername is good too, but it leaves behind the directory structure.

The best I’ve found is a two line batch file with a first pass to delete files and outputs to nul to avoid the overhead of writing to screen for every singe file. A second pass then cleans up the remaining directory structure:

del /f/s/q foldername > nul
rmdir /s/q foldername

This is nearly three times faster than a single rmdir, based on time tests with a Windows XP encrypted disk, deleting ~30GB/1,000,000 files/15,000 folders: rmdir takes ~2.5 hours, del+rmdir takes ~53 minutes. More info at Super User.

This is a regular task for me, so I usually move the stuff I need to delete to C:\stufftodelete and have those del+rmdir commands in a deletestuff.bat batch file. This is scheduled to run at night, but sometimes I need to run it during the day so the quicker the better.

출처: stackoverflow(http://stackoverflow.com/questions/186737/whats-the-fastest-way-to-delete-a-large-folder-in-windows/6208144#6208144)

  1. FastCopy를 이용한다.

FastCopy는 자타가 공인하는 windows에서 file copy를 가장 빠르게 해주는 툴이다. Windows native copy보다는 거의 2배 가까운 성능을 보여준다. 개발자에게는 필수어플!!!

FastCopy에는 delete기능도 제공하는데 이것도 쓸만하다. 속도를 측정해보지는 않았지만 꽤 빠르다.

svn을 사용하면서 branch를 시도때도 없이 수행할텐데 이때  source code level에서 하나 하나 비교해서 merge하는 것은 매우 비효율적이고 기록도 제대로 남질 않는다.

branch와 merge 개념이 애매한데 다시 한번 짚고 넘어가야 할것 같다.

좋은 article이 있으니 참고하자.

출처: http://bchavez.bitarmory.com/archive/2008/06/03/quothow-toquot-svn-merge-with-tortoisesvn.aspx

svn merge의 기본 개념을 위한 article -> link

VS2010으로 넘어오면서 무언가 또~~ 생긴다..

아 얘네들은 뭐 이렇게 많이 만드냐..몇십MB정도는 그냥 만들고 지워도 돼…라고 생각하는 듯 하다.

니네가 그런 마인드로 일을 하니 모바일에서 다 내주는 거야..

각설하고 VS2010으로 작업후 소스 배포 또는 형상관리시 지워도 되는 파일은 아래와 같다.

참고해서 꼭꼭 지워주자..안그럼 HDD 잡아먹는 귀신이 된다…

출처: http://social.msdn.microsoft.com/Forums/en/vcgeneral/thread/1ef46540-e4b8-4779-8403-49239bc3f7ee

‘m not only a C# moderator but also a C++ user :}  The ipch directory and the many, many new files generated by the compiler can be safely deleted.  In fact they should be deleted (and probably are) for clean builds.  I teach a C++ college class myself and here is what I require my students to do.

  1. In the solution folder delete all bin, obj, ipch, debug and release directories.
  2. Delete any .suo files
  3. Delete any .user files
  4. Delete any .ncb files
  5. Delete any .sbr files
  6. Delete any .*log files (for VS 2010)

Visual C++에서 여러개의 프로젝트를 연동하여 작업하는 경우 link 에러가 종종 생긴다.

아래와 같은 예가 대표적인 예인데, 보통 LNK2005 error로 표시된다.

3>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: void __thiscall std::basic_ios >::setstate(int,bool)" (?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z) already defined in panels.lib(panel_main.obj)
3>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: int __thiscall std::ios_base::width(int)" (?width@ios_base@std@@QAEHH@Z) already defined in panels.lib(panel_main.obj)
3>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: int __thiscall std::basic_streambuf >::sputn(char const *,int)" (?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z) already defined in panels.lib(panel_main.obj)
3>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: static bool __cdecl std::char_traits::eq_int_type(int const &,int const &)" (?eq_int_type@?$char_traits@D@std@@SA_NABH0@Z) already defined in panels.lib(panel_main.obj)
3>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: static int __cdecl std::char_traits::eof(void)" (?eof@?$char_traits@D@std@@SAHXZ) already defined in panels.lib(panel_main.obj)
3>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: int __thiscall std::basic_streambuf >::sputc(char)" (?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z) already defined in panels.lib(panel_main.obj)
3>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: class std::basic_streambuf > * __thiscall std::basic_ios >::rdbuf(void)const " (?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ) already defined in panels.lib(panel_main.obj)
3>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: char __thiscall std::basic_ios >::fill(void)const " (?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDXZ) already defined in panels.lib(panel_main.obj)
3>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: int __thiscall std::ios_base::flags(void)const " (?flags@ios_base@std@@QBEHXZ) already defined in panels.lib(panel_main.obj)
3>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: int __thiscall std::ios_base::width(void)const " (?width@ios_base@std@@QBEHXZ) already defined in panels.lib(panel_main.obj)
3>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: static unsigned int __cdecl std::char_traits::length(char const *)" (?length@?$char_traits@D@std@@SAIPBD@Z) already defined in panels.lib(panel_main.obj)
3>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: class std::basic_ostream > & __thiscall std::basic_ostream >::flush(void)" (?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ) already defined in panels.lib(panel_main.obj)
3>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: class std::basic_ostream > * __thiscall std::basic_ios >::tie(void)const " (?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ) already defined in panels.lib(panel_main.obj)
3>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: bool __thiscall std::ios_base::good(void)const " (?good@ios_base@std@@QBE_NXZ) already defined in panels.lib(panel_main.obj)
3>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: void __thiscall std::basic_ostream >::_Osfx(void)" (?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ) already defined in panels.lib(panel_main.obj)
3>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: void __thiscall std::basic_streambuf >::_Lock(void)" (?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ) already defined in panels.lib(panel_main.obj)
3>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: void __thiscall std::basic_streambuf >::_Unlock(void)" (?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ) already defined in panels.lib(panel_main.obj)
3>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: class std::locale::facet * __thiscall std::locale::facet::_Decref(void)" (?_Decref@facet@locale@std@@QAEPAV123@XZ) already defined in panels.lib(panel_main.obj)

이경우는 다른 프로젝트들이 서로 다른 runtime library 형태를 띄고 있기 때문이다.
이 때는 property->c/c++->code generation->runtime library에서 같은 형태로 맞추어 주면 해결된다.
runtime library는 /MT, /MTd, /MD, MDd 등이 있다.
자세한 내용은 아래 링크를 참조하자.
 

출처: http://stackoverflow.com/q/604484/877913

http://msdn.microsoft.com/en-us/library/2kzt1wy3%28v=vs.80%29.aspx