Hi all,
I'll try to build a Viewer like RShow for Windows. For this I've included
several files from the "src" path to my C++ project (the files mentioned in
the "filefmts.pdf"). The compiling seems to works but I still has a linking
error:
Linker-Vorgang l�uft...
Bibliothek ../bin/TKIM_Radiance.lib und Objekt ../bin/TKIM_Radiance.exp
wird erstellt
sceneio.obj : error LNK2001: Nichtaufgeloestes externes Symbol _ofun
mesh.obj : error LNK2001: Nichtaufgeloestes externes Symbol _ofun
modobject.obj : error LNK2001: Nichtaufgeloestes externes Symbol _ofun
otypes.obj : error LNK2001: Nichtaufgeloestes externes Symbol _ofun
readoct.obj : error LNK2001: Nichtaufgeloestes externes Symbol _ofun
../bin/TKIM_Radiance.impd : fatal error LNK1120: 1 unaufgeloeste externe
Verweise
Fehler beim Ausf�hren von link.exe.
I normally only use C++ and not C, so a hint would be very nice!
Best regards and have a nice year,
Patrik
Hi Patrik,
probably your C++ compiler isn't defining "__cplusplus" by default.
Therefore you should define it manually or remove the ifdef's around
the "extern "C"-line" and the corresponding "}" in the headers you are
using.
Hope this helps!
Christian
Hi Christian,
thanks for the idea. VC6 isn't the best compiler :-)) but I never had
problems with other C code like Lib3DS.
Greets,
Patrik
Patrik M�ller wrote:
Hi all,
I'll try to build a Viewer like RShow for Windows. For this I've included
several files from the "src" path to my C++ project (the files mentioned in
the "filefmts.pdf"). The compiling seems to works but I still has a linking
error:
Linker-Vorgang l�uft...
Bibliothek ../bin/TKIM_Radiance.lib und Objekt ../bin/TKIM_Radiance.exp
wird erstellt
sceneio.obj : error LNK2001: Nichtaufgeloestes externes Symbol _ofun
mesh.obj : error LNK2001: Nichtaufgeloestes externes Symbol _ofun
modobject.obj : error LNK2001: Nichtaufgeloestes externes Symbol _ofun
otypes.obj : error LNK2001: Nichtaufgeloestes externes Symbol _ofun
readoct.obj : error LNK2001: Nichtaufgeloestes externes Symbol _ofun
../bin/TKIM_Radiance.impd : fatal error LNK1120: 1 unaufgeloeste externe
Verweise
Fehler beim Ausf�hren von link.exe.
I normally only use C++ and not C, so a hint would be very nice!
This has nothing to do with C++ vs. C or your compiler version.
We have modified all header files earlier this year so that the
code should compile correctly with any conforming C/C++ compiler.
This also means that you should use the HEAD dump instead of the
outdated 3.5 release if you don't do this already.
What you need is the following definition somewhere:
FUN ofun[NUMOTYPE] = INIT_OTYPE;
This statement is present in the sources for several Radiance
executables, as well as in src/rt/initotypes.c (linked into
src/lib/libradiance.a if you use the makeall script, and into
src/lib/librttrace.a if you use SCons) for use by the renderers.
The relevant declarations are in src/common/otypes.h.
Since SCons is platform-independent (most of Radiance compiles
fine with VC6 that way), I'd recommend to build Radiance with
this, and just use the resulting libraries for your project.
SCons automatically selects alternative code for some of the
platform specific functionality, so that you don't need to worry
about most unix APIs. Note that SCons also creates a different
and more granular set of libraries than the Rmakefiles, which
gives you more flexibility to link to just what you need.
The SCons build instructions and requirements can be found
somewhere in the archives here, but you can just ask if you need
any further explanations.
-schorsch
···
--
Georg Mischler -- simulations developer -- schorsch at schorsch com
+schorsch.com+ -- lighting design tools -- http://www.schorsch.com/
This has nothing to do with C++ vs. C or your compiler version.
We have modified all header files earlier this year so that the
code should compile correctly with any conforming C/C++ compiler.
This also means that you should use the HEAD dump instead of the
outdated 3.5 release if you don't do this already.
What you need is the following definition somewhere:
FUN ofun[NUMOTYPE] = INIT_OTYPE;
This statement is present in the sources for several Radiance
executables, as well as in src/rt/initotypes.c (linked into
src/lib/libradiance.a if you use the makeall script, and into
src/lib/librttrace.a if you use SCons) for use by the renderers.
The relevant declarations are in src/common/otypes.h.
Since SCons is platform-independent (most of Radiance compiles
fine with VC6 that way), I'd recommend to build Radiance with
this, and just use the resulting libraries for your project.
SCons automatically selects alternative code for some of the
platform specific functionality, so that you don't need to worry
about most unix APIs. Note that SCons also creates a different
and more granular set of libraries than the Rmakefiles, which
gives you more flexibility to link to just what you need.
The SCons build instructions and requirements can be found
somewhere in the archives here, but you can just ask if you need
any further explanations.
-schorsch
--
Georg Mischler -- simulations developer -- schorsch at schorsch com
+schorsch.com+ -- lighting design tools -- http://www.schorsch.com/
Hi schorsch,
I've searched a little bit a the mailing list but found no hint how to use
SCons. I have now installed Python and SCons. Whats the next step?
Happy new year,
Patrik
Patrik M�ller wrote:
>The SCons build instructions and requirements can be found
>somewhere in the archives here, but you can just ask if you need
>any further explanations.
I've searched a little bit a the mailing list but found no hint how to use
SCons. I have now installed Python and SCons. Whats the next step?
The best information can be found in the SCons documentation.
http://scons.sourceforge.net/doc/HTML/scons-man.html
Here's a brief summary:
In all cases, you need a console window and to change to
the "ray" directory of the Radiance sources.
Then the simplest invocation (assuming Scons is installed so
that it gets found on the %PATH%) is just typing:
scons
which will build everything. If the "scons.bat" file wasn't installed
on your %PATH%, then you can feed its *.py sibling to Python:
python "x:\where\ever\is\scons.py"
You can give arguments to specify individual targets or directories
to get built:
scons src\rt\rtrace.lib
scons src\lib
To remove all previously generated files involved in building a target
use the -c option:
scons -c
There are several configuration options in our build, which will be
remembered for future invocations. The general form is:
scons opt=val
The -h option will give you a list of what's available.
The os specific configuration files are located in ray/platform/.
In your case the file "win32.cfg" will be used. Don't modify those,
because they'll be replaced when you update your sources. If you
want to make any changes (you shouldn't need to), then you can
create a copy named "win32_custom.cfg" and modify that. SCons will
prefer the xxx_custom name for a platform if it exists.
-schorsch
···
--
Georg Mischler -- simulations developer -- schorsch at schorsch com
+schorsch.com+ -- lighting design tools -- http://www.schorsch.com/
Yes,
now I've got the libs!!! :-))
Now lets continue with the original project...
Thanks for the fast help,
Patrik
···
-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of Georg
Mischler
Sent: Friday, January 02, 2004 9:34 AM
To: [email protected]
Subject: Re: [Radiance-dev] Problems with using VC6
Patrik M�ller wrote:
>The SCons build instructions and requirements can be found
>somewhere in the archives here, but you can just ask if you need
>any further explanations.
I've searched a little bit a the mailing list but found no hint how to use
SCons. I have now installed Python and SCons. Whats the next step?
The best information can be found in the SCons documentation.
http://scons.sourceforge.net/doc/HTML/scons-man.html
Here's a brief summary:
In all cases, you need a console window and to change to
the "ray" directory of the Radiance sources.
Then the simplest invocation (assuming Scons is installed so
that it gets found on the %PATH%) is just typing:
scons
which will build everything. If the "scons.bat" file wasn't installed
on your %PATH%, then you can feed its *.py sibling to Python:
python "x:\where\ever\is\scons.py"
You can give arguments to specify individual targets or directories
to get built:
scons src\rt\rtrace.lib
scons src\lib
To remove all previously generated files involved in building a target
use the -c option:
scons -c
There are several configuration options in our build, which will be
remembered for future invocations. The general form is:
scons opt=val
The -h option will give you a list of what's available.
The os specific configuration files are located in ray/platform/.
In your case the file "win32.cfg" will be used. Don't modify those,
because they'll be replaced when you update your sources. If you
want to make any changes (you shouldn't need to), then you can
create a copy named "win32_custom.cfg" and modify that. SCons will
prefer the xxx_custom name for a platform if it exists.
-schorsch
--
Georg Mischler -- simulations developer -- schorsch at schorsch com
+schorsch.com+ -- lighting design tools -- http://www.schorsch.com/
_______________________________________________
Radiance-dev mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-dev