This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: linker error libcygwin

On 2011-11-11 01:57:48 +0100, Greg Chicares said:

On 2011-11-10 21:22Z, Philipp Kraus wrote:
On 2011-11-10 22:11:48 +0100, Greg Chicares said:

On 2011-11-10 20:39Z, Kraus Philipp wrote:

undefined reference to `_WinMain@16' collect2: ld returned 1 exit status

Does this thread contain the answer?

no, sorry.

If this is a console application, does it have
an implementation of main()?

yes the signature of the main is in this example: int main(int argc, char* argv[])

Please show the full linker command, and indicate the name of the object file that contains main().

The full linker command shows (I split the flags for a better reading):

g++ -o build/target.exe -mconsole -enable-stdcall-fixup -mthread examples/other/target.o

"-L/cygdrive/c/Program Files/TortoiseSVN/bin"
"-L/cygdrive/c/Program Files/Java/jdk1.6.0_29/bin"


I have tested the same call with another example (only the *.cpp / *.o file changes) and it works. The difference is the cpp code, but
a compiler call run's without an error. I don't understand why different sources with the same linker command creates different results.
The linking process should be deterministic, so the compiled object code creates the same linker calls.



Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]