Re: C++/TCL Need Solution to Compile Error c2784



On Apr 18, 6:12 pm, JesusChuyCam...@xxxxxxxxx wrote:
On Apr 18, 11:39 am, David Gravereaux <davyg...@xxxxxxxxx> wrote:



JesusChuyCam...@xxxxxxxxx wrote:
BTW: I did tried to add "namespacejnior{ #include "integpg/
jnior_300.h" }" and created other errors where it didn't even compile.
Error Message:
jnior310tcl2.c
jnior310tcl2.c(4) : error C2061: syntax error : identifier 'jnior'
jnior310tcl2.c(4) : error C2059: syntax error : ';'
jnior310tcl2.c(4) : error C2449: found '{' at file scope (missing
function header?)
jnior310tcl2.c(4) : error C2014: preprocessor command must start as
first nonwhite space
jnior310tcl2.c(121) : fatal error C1004: unexpected end-of-file found

I forgot to mention you'd have to change over to C++ by renaming the source file
with the extension .cpp instead of .c so the compiler switches modes.

Error Message:
jnior310tcl2.c
c:\program files\tcl_tk\tcl_c_api2\integpg/jnior_300.h(19) : warning
C4031: second formal parameter list longer than the first list
c:\program files\tcl_tk\tcl_c_api2\integpg/jnior_300.h(19) : warning
C4028: formal parameter 1 different from declaration
c:\program files\tcl_tk\tcl_c_api2\integpg/jnior_300.h(19) : warning
C4142: benign redefinition of type
c:\program files\tcl_tk\tcl_c_api2\integpg/jnior_300.h(19) : warning
C4273: 'GetVersion' : inconsistent dll linkage
C:\Program Files\Microsoft Platform SDK for Windows Server
2003 R2\Include\winbase.h(1917) : see previous definition of
'GetVersion'

^- that's still the problem with <windows.h> having the same function name as one
contained in jnior_300.h. Just like the error says. What you could do is to not
#include <windows.h> at all. Tcl extensions can build without it as long as they
don't use any of the services. To be honest, you should contact the API authors
and ask them how to handle their error.

Creating library jnior310tcl2.lib and object jnior310tcl2.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
jnior310tcl2.dll : fatal error LNK1120: 2 unresolved externals

That part has me perplexed. jnior300.lib is included in the link, yet the linker
does resolve any function contained in it. I think you'd better ask the authors
about that. You can use the lib.exe tool to query what it contains. I'm assuming
it is an import library. If it's an import library made be Borland C++ builder,
it won't work with the MS toolchain. Even if its a static library, it should
resolve something.

--
It's psychosomatic. You need a lobotomy. I'll get a saw.
-- Calvin

signature.asc
1KDownload

IT COMPILE!!!!!

I use namespace as you suggested and renamed the file to .cpp Got
zero warnings and error messages!!!

When I load it, I get the following error:
tclsh> load jnior310tcl2.dll
couldn't load library "jnior310tcl.dll": this library or a dependent
library could not be found in library path

Which appears to be an error because it depending on the SDK dll
(jnior300.dll). I append the path to auto_path and I still get the
error message. Looked through the groups, and there are two
possibilities:
1) My paths are wrong
2) The DLL has an internal error

BTW: I also tried to copy the jnior300.dll into "C:\Program Files\Tcl
\lib" and "C:\Program Files\Tcl\bin" and neither worked. I also
copied the file to "C:\WINDOWS\system" and "C:\WINDOWS\system32" and
nothing.

I remember way back when (1997) on windows NT, I was able to look at
DLL properties to see dependencies and where the dependencies should
exist. Just can remember the name of that tool.

Will investigate further!!

-JC

I executed "Depends" from the MS Platform SDK Tools to see analyze the
jnior310tcl2.dll. In there, i have two yellow question marks, one for
jnior300.dll and the other for msvcr80.dll. When I select either of
these dlls, I able to see the function name, but if i right click on
them to see the properties, I get an error message that it can not
find it.

.



Relevant Pages

  • Re: C++/TCL Need Solution to Compile Error c2784
    ... Error Message: ... first nonwhite space ... Which appears to be an error because it depending on the SDK dll ... DLL properties to see dependencies and where the dependencies should ...
    (comp.lang.tcl)
  • Re: Windows 7 dll import problem
    ... For example, for us, WCSRV2.DLL is the our DLL for WIN32 and for .NET DLLIMPORTING. ... So there are more dependencies that uses 8.0 dlls files and these are trying to load or aliased with SxS. ... Ldepends has a problem finding SxS stuff, but when the EXE or DLL is loaded for real, the OS loader knows whats to do. ... If you compile with VS200x then you will bring more libraries that are for that compiler version RTL. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Create a COM Object with C#?
    ... >gets this error message during the VB compile: ... >its dependencies was not found." ... Mattias Sjögren [MVP] mattias @ mvps.org ...
    (microsoft.public.dotnet.languages.csharp)
  • HELP! where is windows.h ??
    ... I keep getting the error message that it doesn't exist. ... using prompt line compile ... I have full documentation on all the functions in the dll ... Robert A. Macy ...
    (microsoft.public.vc.language)
  • Re: HELP! where is windows.h ??
    ... > I keep getting the error message that it doesn't exist. ... > I'm running MSCV++ free download, using prompt line compile ... > I have full documentation on all the functions in the dll ... > Robert A. Macy ...
    (microsoft.public.vc.language)