Re: C++/TCL Need Solution to Compile Error c2784
- From: David Gravereaux <davygrvy@xxxxxxxxx>
- Date: Tue, 17 Apr 2007 19:49:33 -0700
JesusChuyCampos@xxxxxxxxx wrote:
David,
I got one more question. Do I have to tell the compiler to load the
jnior.dll or does it have to be part of the source code.
It needs to be part of the link. That's what the .lib file is for.
Here are the
error messages that I'm getting. What compiler are you using?
MSVC++ 6 (an oldie, but works for me)
error04.txt
===================================== START
jnior310tcl2.c
c:\program files\tcl_tk\tcl_c_api2\jnior_300.h(19) : warning C4031:
second formal parameter list longer than the first list
c:\program files\tcl_tk\tcl_c_api2\jnior_300.h(19) : warning C4028:
formal parameter 1 different from declaration
c:\program files\tcl_tk\tcl_c_api2\jnior_300.h(19) : warning C4142:
benign redefinition of type
c:\program files\tcl_tk\tcl_c_api2\jnior_300.h(19) : warning C4273:
'GetVersion' : inconsistent dll linkage
C:\Program Files\Microsoft Visual Studio\VC98\include
\winbase.h(1116) : see previous definition of 'GetVersion'
^-- All problems with the jnior header file's definition of GetVersion(). The
same function name is exported by windows, too. You could get around it by using
C++ namespaces like so:
namespace jnior {
# include "jnior_300.h"
}
Then the function would be jnior::GetVersion() and wouldn't clash. All other
jnior functions and types would be in that namespace as well. How the linker
would resolve that, I'm not sure off-hand.
Creating library jniortcl2.lib and object jniortcl2.exp
jnior310tcl2.obj : error LNK2019: unresolved external symbol
_Connect@20 referenced in function _ConnectCmd
jnior310tcl2.obj : error LNK2019: unresolved external symbol
_Disconnect@4 referenced in function _DisconnectCmd
jniortcl2.dll : fatal error LNK1120: 2 unresolved externals
===================================== STOP
Make sure jnior300.lib is in your list of libraries you link to and the path to
find it is there too.
I guess my biggest problem is with the compiler. I got IT to re-
installed MS Visual Studio 6 (because we have a spare license), and
that just gave me more problems, and I then had IT re-installed MS VC+
+ 2005 "Express Edition", since it has a 30 day trial, but it is
missing the "window.h", so now I'm trying to link libraries from both
compilers.
-JC
Cross-pollinating compilers voids your warranty ;) Just joking, should work fine.
There's always the "Platform SDK" from MSDN if you need the window.h stuff, but
it's rather a big download as I remember.
About you only get using an IDE environment is the ability to step-debug your
application, which may or may not be needed for your project. I like free
compilers, myself.. there's nothing wrong with them.
--
"But the important thing is persistence." -Calvin trying to juggle eggs
Attachment:
signature.asc
Description: OpenPGP digital signature
- Follow-Ups:
- Re: C++/TCL Need Solution to Compile Error c2784
- From: JesusChuyCampos
- Re: C++/TCL Need Solution to Compile Error c2784
- References:
- C++/TCL Need Solution to Compile Error c2784
- From: JesusChuyCampos
- Re: C++/TCL Need Solution to Compile Error c2784
- From: David Gravereaux
- Re: C++/TCL Need Solution to Compile Error c2784
- From: JesusChuyCampos
- Re: C++/TCL Need Solution to Compile Error c2784
- From: Christian Gollwitzer
- Re: C++/TCL Need Solution to Compile Error c2784
- From: David Gravereaux
- Re: C++/TCL Need Solution to Compile Error c2784
- From: Alexandre Ferrieux
- Re: C++/TCL Need Solution to Compile Error c2784
- From: David Gravereaux
- Re: C++/TCL Need Solution to Compile Error c2784
- From: David Gravereaux
- Re: C++/TCL Need Solution to Compile Error c2784
- From: JesusChuyCampos
- Re: C++/TCL Need Solution to Compile Error c2784
- From: David Gravereaux
- Re: C++/TCL Need Solution to Compile Error c2784
- From: JesusChuyCampos
- Re: C++/TCL Need Solution to Compile Error c2784
- From: David Gravereaux
- Re: C++/TCL Need Solution to Compile Error c2784
- From: JesusChuyCampos
- C++/TCL Need Solution to Compile Error c2784
- Prev by Date: Re: C++/TCL Need Solution to Compile Error c2784
- Next by Date: Re: How to subtract precision numbers
- Previous by thread: Re: C++/TCL Need Solution to Compile Error c2784
- Next by thread: Re: C++/TCL Need Solution to Compile Error c2784
- Index(es):
Relevant Pages
|