Hi Daved,
I compiled QRBH.cpp also last time, still got those errors.
There are only 4 files total: example0.cpp, example1.cpp, QRBG.cpp, QRBG.h
The cpp file example0 and example1 are independent, each of which included QRBG.h, which in turn includes and QRBG.cpp. Even if I compile all 4 together, I get the same errors:
In other news, I was able to get the Mersenne Twister PRNG (psuedo random number generator) to work. I included that in my simulation and it worked beautifully! Results were exactly as expected/calculated, which was simply a delight to see. I can't wait to share my results on the forum. But first, I really want to make the QRBG work, and compare its results with the PRNG results.Code:C:\QRBG\src>cl /EHsc example0.cpp QRBG.cpp example1.cpp
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
example0.cpp
QRBG.cpp
example1.cpp
Generating Code...
Microsoft (R) Incremental Linker Version 9.00.21022.08
Copyright (C) Microsoft Corporation. All rights reserved.
/out:example0.exe
example0.obj
QRBG.obj
example1.obj
example1.obj : error LNK2005: _main already defined in example0.obj
QRBG.obj : error LNK2019: unresolved external symbol _connect@12 referenced in f
unction "private: void __thiscall QRBG::Connect(void)" (?Connect@QRBG@@AAEXXZ)
QRBG.obj : error LNK2019: unresolved external symbol _htons@4 referenced in func
tion "private: void __thiscall QRBG::Connect(void)" (?Connect@QRBG@@AAEXXZ)
QRBG.obj : error LNK2019: unresolved external symbol _inet_addr@4 referenced in
function "private: void __thiscall QRBG::Connect(void)" (?Connect@QRBG@@AAEXXZ)
QRBG.obj : error LNK2019: unresolved external symbol _gethostbyname@4 referenced
in function "private: void __thiscall QRBG::Connect(void)" (?Connect@QRBG@@AAEX
XZ)
QRBG.obj : error LNK2019: unresolved external symbol _socket@12 referenced in fu
nction "private: void __thiscall QRBG::Connect(void)" (?Connect@QRBG@@AAEXXZ)
QRBG.obj : error LNK2019: unresolved external symbol _closesocket@4 referenced i
n function "private: void __thiscall QRBG::Close(void)" (?Close@QRBG@@AAEXXZ)
QRBG.obj : error LNK2019: unresolved external symbol _shutdown@8 referenced in f
unction "private: void __thiscall QRBG::Close(void)" (?Close@QRBG@@AAEXXZ)
QRBG.obj : error LNK2019: unresolved external symbol _ntohl@4 referenced in func
tion "private: unsigned int __thiscall QRBG::AcquireBytesFromService(unsigned ch
ar *,unsigned int)" (?AcquireBytesFromService@QRBG@@AAEIPAEI@Z)
QRBG.obj : error LNK2019: unresolved external symbol _recv@16 referenced in func
tion "private: unsigned int __thiscall QRBG::AcquireBytesFromService(unsigned ch
ar *,unsigned int)" (?AcquireBytesFromService@QRBG@@AAEIPAEI@Z)
QRBG.obj : error LNK2019: unresolved external symbol _send@16 referenced in func
tion "private: unsigned int __thiscall QRBG::AcquireBytesFromService(unsigned ch
ar *,unsigned int)" (?AcquireBytesFromService@QRBG@@AAEIPAEI@Z)
QRBG.obj : error LNK2019: unresolved external symbol _htonl@4 referenced in func
tion "private: unsigned int __thiscall QRBG::AcquireBytesFromService(unsigned ch
ar *,unsigned int)" (?AcquireBytesFromService@QRBG@@AAEIPAEI@Z)
example0.exe : fatal error LNK1120: 11 unresolved externals
C:\QRBG\src>