Re: Building DLM on Windows 64-bit [message #76246 is a reply to message #76244] |
Mon, 23 May 2011 12:20   |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
On May 23, 2:10 pm, David Fanning <n...@idlcoyote.com> wrote:
> Folks,
>
> After all these years, I thought it was about time I built a DLM
> file and called it from IDL. To this end, I've purchased Ronn's
> book Calling C and C++ from IDL and I've started in. I installed
> Visual Studio 2010 Express and I am trying to build the very
> first example in the book, simpleExample. (See snapshot_4.png
> below.)
>
> I have a project named simpleExample. This is an empty DLL
> project, as described in Ronn's book. I have installed
> in the source folder two C programs: IDL_Load.c and
> simpleExample.c. I have installed in the header folder
> two files: simpleExample.h and export.h. (I had to copy
> the latter over from the IDL directory because I could
> NOT get VS to find the darn thing! I tried adding it
> in the "Include Directories" list for both the VC++
> Directories and the C/C++ tabs in the project property
> sheet. I tried adding the file name both with and without
> quotes around it. All to no avail! See screenshot_1 and
> screenshot_2 in the examples below.)
>
> In the Linker Input tab in the project property page,
> I have included idl.lib (both with and without quotes, too).
> I have also specified the name of a Module Definition File,
> simpleExample.def, which is written like this:
>
> LIBRARY simpleExample
> DESCRIPTION 'A simple example program'
> EXPORTS IDL_Load @1
>
> You can see the Linker Input tab in screenshot_3.png.
>
> When I try to build this project, I get the following errors.
>
> 1>------ Build started: Project: simpleExample, Configuration: Debug
> Win32 ------
> 1>C:\IDL\dlm\simpleExample.def(2): warning LNK4017: DESCRIPTION
> statement not supported for the target platform; ignored
> 1> Creating library C:\Users\David\documents\visual studio 2010
> \Projects\simpleExample\Debug\simpleExample.lib and object C:\Users
> \David\documents\visual studio 2010\Projects\simpleExample\Debug
> \simpleExample.exp
> 1>IDL_Load.obj : error LNK2019: unresolved external symbol
> _IDL_SysRtnAdd referenced in function _IDL_Load
> 1>simpleExample.obj : error LNK2019: unresolved external symbol
> _IDL_GettmpLong referenced in function _simpleFunction
> 1>simpleExample.obj : error LNK2019: unresolved external symbol
> _IDL_Message referenced in function _simpleFunction
> 1>C:\Users\David\documents\visual studio 2010\Projects\simpleExample
> \Debug\simpleExample.dll : fatal error LNK1120: 3 unresolved externals
> ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
> ==========
>
> It would appear I am missing an "export" file. Ronn mentions
> that this is needed for building on a Windows platform,
> but nowhere describes it or tells me how to create it.
> (At least in what I have read so far.) Is this what
> I need?
>
> I am at wit's end! Can anyone offer a way forward?
>
> http://www.idlcoyote.com/misc/snapshot_1.png
> http://www.idlcoyote.com/misc/snapshot_2.png
> http://www.idlcoyote.com/misc/snapshot_3.png
These suggest to me that VS is not finding idl.lib because what is
given in the library directories is the file, not the directory. The
same for the include directory. I would check on the compiler command
generated by VS to confirm this.
|
|
|