-
Notifications
You must be signed in to change notification settings - Fork 22
Description
As I was running the unit tests for DSFML to test the Packet changes in #204, I saw a few assertion failures and then the unit test for Packet hung for a minute before I stopped it. I then pulled out the unit testing code into its own program to debug it and got the following error:
Linking...
Undefined symbols for architecture x86_64:
"_D5dsfml7network11tcplistener11TcpListener6__ctorMFZC5dsfml7network11tcplistener11TcpListener", referenced from:
__Dmain in dsfml-test.o
"_D5dsfml7network11tcplistener11TcpListener7__ClassZ", referenced from:
__Dmain in dsfml-test.o
"_D5dsfml7network12__ModuleInfoZ", referenced from:
_D3app12__ModuleInfoZ in dsfml-test.o
"_D5dsfml7network6packet6Packet6__ctorMFZC5dsfml7network6packet6Packet", referenced from:
__Dmain in dsfml-test.o
"_D5dsfml7network6packet6Packet7__ClassZ", referenced from:
__Dmain in dsfml-test.o
"_D5dsfml7network6packet6Packet9checkSizeMFmZb", referenced from:
_D5dsfml7network6packet6Packet11__T4readTkZ4readMFJkZb in dsfml-test.o
_D5dsfml7network6packet6Packet11__T4readTaZ4readMFJaZb in dsfml-test.o
_D5dsfml7network6packet6Packet11__T4readTiZ4readMFJiZb in dsfml-test.o
_D5dsfml7network6packet6Packet11__T4readTdZ4readMFJdZb in dsfml-test.o
_D5dsfml7network6packet6Packet11__T4readTbZ4readMFJbZb in dsfml-test.o
_D5dsfml7network6packet6Packet11__T4readTmZ4readMFJmZb in dsfml-test.o
_D5dsfml7network6packet6Packet11__T4readTfZ4readMFJfZb in dsfml-test.o
...
"_D5dsfml7network6packet7__arrayZ", referenced from:
_D5dsfml7network6packet6Packet14__T5writeTAyaZ5writeMFNaNbAyaZv in dsfml-test.o
_D5dsfml7network6packet6Packet13__T4readTAyaZ4readMFJAyaZb in dsfml-test.o
"_D5dsfml7network9ipaddress9IpAddress9LocalHostyS5dsfml7network9ipaddress9IpAddress", referenced from:
__Dmain in dsfml-test.o
"_D5dsfml7network9tcpsocket9TcpSocket6__ctorMFZC5dsfml7network9tcpsocket9TcpSocket", referenced from:
__Dmain in dsfml-test.o
"_D5dsfml7network9tcpsocket9TcpSocket7__ClassZ", referenced from:
__Dmain in dsfml-test.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
--- errorlevel 1
dmd failed with exit code 1.
I changed back to the current master branch's code and checked the unittests for Packet in the same manner (stick them in a method "stupidTest" and just run) and the error message barely changed (note, for ease of use I just shoved this into a previous project that uses the current master branch rather than actually moving things around):
Linking...
Undefined symbols for architecture x86_64:
"_D5dsfml7network11tcplistener11TcpListener6__ctorMFZC5dsfml7network11tcplistener11TcpListener", referenced from:
_D7ridgway10pmgcrawler3app10stupidTestFZv in pmgcrawler.o
"_D5dsfml7network11tcplistener11TcpListener7__ClassZ", referenced from:
_D7ridgway10pmgcrawler3app10stupidTestFZv in pmgcrawler.o
"_D5dsfml7network12__ModuleInfoZ", referenced from:
_D7ridgway10pmgcrawler3app12__ModuleInfoZ in pmgcrawler.o
"_D5dsfml7network6packet6Packet6__ctorMFZC5dsfml7network6packet6Packet", referenced from:
_D7ridgway10pmgcrawler3app10stupidTestFZv in pmgcrawler.o
"_D5dsfml7network6packet6Packet7__ClassZ", referenced from:
_D7ridgway10pmgcrawler3app10stupidTestFZv in pmgcrawler.o
"_D5dsfml7network9ipaddress9IpAddress9LocalHostyS5dsfml7network9ipaddress9IpAddress", referenced from:
_D7ridgway10pmgcrawler3app10stupidTestFZv in pmgcrawler.o
"_D5dsfml7network9tcpsocket9TcpSocket6__ctorMFZC5dsfml7network9tcpsocket9TcpSocket", referenced from:
_D7ridgway10pmgcrawler3app10stupidTestFZv in pmgcrawler.o
"_D5dsfml7network9tcpsocket9TcpSocket7__ClassZ", referenced from:
_D7ridgway10pmgcrawler3app10stupidTestFZv in pmgcrawler.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
--- errorlevel 1
dmd failed with exit code 1.
I tried with both the precompiled DSFMLC library files on dsfml.com and by compiling them on my own and both gave this error. When running the unittests for DSFML I do not get this error, but my two other attempts to use the networking library from another program resulted in this symbol failure.