#120718 - Izhido - Mon Mar 05, 2007 7:53 pm
Hi guys!
I have the following program:
This program, though compiles, does not "link" (evidently :D ).
When compiled by Visual C++ 2005 Express / Win32 platform, it gives us the following output:
Additionally, the "Error List" window shows the 3 linking errors.
When compiled with devkitPro (also using Visual C++ 2005 Express), this is the output:
However, this time, the Error List window shows no linking errors.
I've been told this is because of the "regular expression" submitted to the "sed" command line tool during compilation. I must confess I haven't the slightest idea of how to build sed regexp strings.
Anyone here with sed expertise can provide us with an regexp that let us see linking errors in the Error List tab of Visual C++ 2005 Express?
The current, recommended regexp for Visual C++ 2005 Express is:
Any help will be greatly appreciated!
- Izhido
Last edited by Izhido on Wed Mar 07, 2007 7:37 pm; edited 1 time in total
I have the following program:
Code: |
void Test1(); void Test2(int a); void Test3(float b, char* c); int main() { Test1(); Test2(5); Test3(8.3f, "hello!"); } |
This program, though compiles, does not "link" (evidently :D ).
When compiled by Visual C++ 2005 Express / Win32 platform, it gives us the following output:
Code: |
------ Rebuild All started: Project: LinkingErrorTestWin32, Configuration: Debug Win32 ------ Deleting intermediate and output files for project 'LinkingErrorTestWin32', configuration 'Debug|Win32' Compiling... main.cpp Linking... main.obj : error LNK2019: unresolved external symbol "void __cdecl Test3(float,char *)" (?Test3@@YAXMPAD@Z) referenced in function _main main.obj : error LNK2019: unresolved external symbol "void __cdecl Test2(int)" (?Test2@@YAXH@Z) referenced in function _main main.obj : error LNK2019: unresolved external symbol "void __cdecl Test1(void)" (?Test1@@YAXXZ) referenced in function _main C:\PRJ\LinkingErrorTest\Debug\LinkingErrorTestWin32.exe : fatal error LNK1120: 3 unresolved externals Build log was saved at "file://c:\PRJ\LinkingErrorTest\LinkingErrorTestWin32\Debug\BuildLog.htm" LinkingErrorTestWin32 - 4 error(s), 0 warning(s) ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ========== |
Additionally, the "Error List" window shows the 3 linking errors.
When compiled with devkitPro (also using Visual C++ 2005 Express), this is the output:
Code: |
------ Rebuild All started: Project: LinkingErrorTestNDS, Configuration: Debug Win32 ------ Performing Makefile project actions clean ... main.cpp arm-eabi-g++ -MMD -MP -MF /c/PRJ/LinkingErrorTest/LinkingErrorTestNDS/Debug/main.d -g -Wall -O2 -mcpu=arm9tdmi -mtune=arm9tdmi -fomit-frame-pointer -ffast-math -mthumb -mthumb-interwork -I/C/PRJ/LinkingErrorTest/LinkingErrorTestNDS -I/C/devkitPro/libnds/include -I/c/PRJ/LinkingErrorTest/LinkingErrorTestNDS/Debug -DARM9 -fno-rtti -fno-exceptions -c /C/PRJ/LinkingErrorTest/LinkingErrorTestNDS/main.cpp -o main.o linking LinkingErrorTestNDS.elf main.o: In function `main': c:/PRJ/LinkingErrorTest/LinkingErrorTestNDS/main.cpp(9): undefined reference to `Test1()' c:/PRJ/LinkingErrorTest/LinkingErrorTestNDS/main.cpp(10): undefined reference to `Test2(int)' c:/PRJ/LinkingErrorTest/LinkingErrorTestNDS/main.cpp(11): undefined reference to `Test3(float, char*)' collect2: ld returned 1 exit status make[1]: *** [/c/PRJ/LinkingErrorTest/LinkingErrorTestNDS/LinkingErrorTestNDS.elf] Error 1 make: *** [Debug] Error 2 Build log was saved at "file://c:\PRJ\LinkingErrorTest\LinkingErrorTestNDS\Debug\BuildLog.htm" LinkingErrorTestNDS - 0 error(s), 0 warning(s) ========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ========== |
However, this time, the Error List window shows no linking errors.
I've been told this is because of the "regular expression" submitted to the "sed" command line tool during compilation. I must confess I haven't the slightest idea of how to build sed regexp strings.
Anyone here with sed expertise can provide us with an regexp that let us see linking errors in the Error List tab of Visual C++ 2005 Express?
The current, recommended regexp for Visual C++ 2005 Express is:
Code: |
's/\(.[a-zA-Z]\+\):\([0-9]\+\):/\1(\2):/' |
Any help will be greatly appreciated!
- Izhido
Last edited by Izhido on Wed Mar 07, 2007 7:37 pm; edited 1 time in total