undefined reference to `WinMain' Error.

770 views
Skip to first unread message

박준석

unread,
Jan 7, 2016, 2:31:27 AM1/7/16
to cpputest
Hi. 
I am trying to build https://github.com/patrickyeon/Pingu project
but I am new to cpputest so I have no idea below the error
Could you tell me how to solve it? 

my environment is :

windows 10 64bit
cygwin
cpputest-.3.7.1

$ make -f MakefileWorker.mk
Linking pingu_tests
g++ -o pingu_tests lib/libpingu.a C:\cygwin64\home\Junsuk_Park\cpputest-3.7.1/lib/libCppUTest.a  -static -g
/usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../lib/libcygwin.a(libcmain.o): In function `main':
/usr/src/debug/cygwin-2.3.1-1/winsup/cygwin/lib/libcmain.c:39: undefined reference to `WinMain'
/usr/src/debug/cygwin-2.3.1-1/winsup/cygwin/lib/libcmain.c:39:(.text.startup+0x7f): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `WinMain'
collect2: error: ld returned 1 exit status

Bas Vodde

unread,
Jan 7, 2016, 2:55:42 AM1/7/16
to cppu...@googlegroups.com

Hi,

Uhm. your linker step has no tests, so it can’t find the AllTests.cpp.

So, it can’t find the main function.

Bas


--
You received this message because you are subscribed to the Google Groups "cpputest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpputest+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages