May 01, 2024, 10:28:44 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Unknown types in includes

Started by EvangelMike, March 05, 2009, 07:00:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

EvangelMike

March 05, 2009, 07:00:11 PM Last Edit: March 05, 2009, 07:19:15 PM by EvangelMike
Greetings! I ran EBasicHeaders.exe, which I downloaded from the ionicwind web site. I was unable to find any instructions on using EBasicHeaders.exe, but since I am in a hurry, I backed up my computer (just in case) and ran EBasicHeaders.exe. Its output showed various error messages:

Installing headers to C:\Program Files\EBDev\include
- decompressing \include\accctrl.inc
- decompressing \include\AclAPI.inc

( a great number of decompressing lines here; omitted for brevity)

- decompressing \include\zlib.inc
- decompressing \include\zmouse.inc
- decompressing \include\_ENTRYID.inc

Installing libraries to C:\Program Files\EBDev\libs
- decompressing \libs\bass24.lib
- decompressing \libs\custom\bass24.lib

{Many lines indicating decompressing omitted here.)

- decompressing \libs\wlanapi.lib
- decompressing \libs\zlib.lib
- decompressing \libs\_crtdll.lib

Installing redistributable dll's to C:\Program Files\EBDev\redist
- decompressing \redist\glaux.dll
- decompressing \redist\lame_enc.dll
- decompressing \redist\strsafe.dll

Installing redistributable dll's to C:\WINNT\system32
- decompressing WINNT\system32\glaux.dll
- decompressing WINNT\system32\lame_enc.dll
- decompressing WINNT\system32\strsafe.dll

Creating required import libraries in C:\Program Files\EBDev\libs
- created AclUI.lib
- The library alut.dll could not be located [http://www.nvidia.com/content/drivers/drivers.asp]
- created atl.lib
- created avicap32.lib
- created avifil32.lib
- The library bass.dll could not be located [http://un4seen.com/]
- created c_g18030.lib
- created cabinet.lib
- The library cg.dll could not be located [http://developer.nvidia.com/object/cg_toolkit.html]
- The library cgGL.dll could not be located [http://developer.nvidia.com/object/cg_toolkit.html]
- created Crypt32.lib
- created d3d8.lib
- The library d3d8d.dll could not be located [http://www.microsoft.com/downloads/Browse.aspx?categoryid=2]
- created d3d9.lib
- The library d3d9d.dll could not be located [http://www.microsoft.com/downloads/Browse.aspx?categoryid=2]
- The library d3dx8d.dll could not be located [http://www.microsoft.com/downloads/Browse.aspx?categoryid=2]
- The library d3dx9_30.dll could not be located [http://www.microsoft.com/downloads/Browse.aspx?categoryid=2]
- The library d3dx9_32.dll could not be located [http://www.microsoft.com/downloads/Browse.aspx?categoryid=2]
- created Dbghelp.lib
- created dciman32.lib
- The library devil.dll could not be located
- created dhcpcsvc.lib
- created dinput8.lib
- created dnsapi.lib
- created dsuiext.lib
- The library eax.dll could not be located [http://developer.soundblaster.com/articles/article.asp?cat=1&sbcat=33&top=85&aid=152]
- created faultrep.lib
- The library fmod_event.dll could not be located [http://www.fmod.org]
- The library fmodex.dll could not be located [http://www.fmod.org]
- The library fmodexp.dll could not be located [http://www.fmod.org]
- created fxsroute.lib
- created gdiplus.lib
- The library glew32.dll could not be located [http://glew.sourceforge.net/install.html]
- created glu32.lib
- The library glut32.dll could not be located [http://www.opengl.org/resources/libraries/glut]
- created hhctrl.lib
- created httpapi.lib
- The library ilu.dll could not be located
- The library ilut.dll could not be located
- created Imagehlp.lib
- created inetcfg.lib
- The library ip6fwapi.dll could not be located
- created lame_enc.lib
- The library lua5.1 could not be located [http://www.lua.org]
- The library lua51.dll could not be located [http://www.lua.org]
- created mapi32.lib
- The library ml10.dll could not be located
- The library mlu10.dll could not be located
- created mobsync.lib

(many lines indicating libraries created omitted here)

- created Mswsock.lib
- The library mtx.dll could not be located
- created mtxoci.lib
- created Netapi32.lib
- created ntdll.lib
- created ntmsapi.lib
- created Oleacc.lib
- The library openal32.dll could not be located [http://developer.creative.com/]

many lines indicating libraries created omitted here)

- The library sdl.dll could not be located [http://www.libsdl.org/]
- The library SDL_image.dll could not be located [http://www.libsdl.org/projects/SDL_image]
- The library SDL_mixer.dll could not be located [http://www.libsdl.org/projects/SDL_mixer]
- The library SDL_net.dll could not be located [http://www.libsdl.org/projects/SDL_net]
- The library SDL_ttf.dll could not be located [http://www.libsdl.org/projects/SDL_ttf]
- created setupapi.lib
- created sisbkup.lib
- The library sqlite3.dll could not be located [http://www.sqlite.org/]
- created srclient.lib
- created Storprop.lib
- created strsafe.lib
- created tapi32.lib
- created traffic.lib
- The library unrar.dll could not be located [http://www.rarlab.com/rar_add.htm]
- created urlmon.lib
- created userenv.lib
- created uxtheme.lib
- created version.lib
- created winhttp.lib
- created Winscard.lib
- created wldap32.lib
- The library wmsdk.dll could not be located [http://www.microsoft.com/downloads/details.aspx?FamilyID=e43cbe59-678a-458a-86a7-ff1716fad02f]
- created wmvcore.lib
- The library wpcap.dll could not be located [http://www.winpcap.org]
- created wshtcpip.lib
- created xenroll.lib
- The library xinput1_1.dll could not be located [http://www.microsoft.com/downloads/Browse.aspx?categoryid=2]
- created xolehlp.lib
- The library zlib1.dll could not be located [http://www.zlib.net]

Done in 12 seconds

I then modified the code of my TestPassVars to declare arrays (again!) rather than individual variables and added the following Includes at the very start of my subroutine:

$include "C:\Program Files\EBDev\include\IL\il.inc"
$include "C:\Program Files\EBDev\include\IL\ilu.inc"
$include "C:\Program Files\EBDev\include\IL\ilut.inc"


Upon Build > Build Single, I got the following:

Compiling...
TestPassVars.eba
File: C:\Program Files\EBDev\include\IL\il.inc (69) unknown type - UCHAR
File: C:\Program Files\EBDev\include\IL\il.inc (75) unknown type - UCHAR
File: C:\Program Files\EBDev\include\IL\il.inc (76) unknown type - USHORT
Error(s) in compiling C:\ExcelDLLs\TestPassVars.eba


How do I go about having UCHAR and USHORT defined. Thanks! May you have a blessed day.

Sincerely,

Michael D Fitzpatrick

Ionic Wind Support Team

Those aren't error messages Mike, those are information messages showing you were the files were installed to.  And I edited your post, once again, as it wasn't necessary to post the output of an installer here.

You need to include whatever windows header files needed by the functions you want to use or just include them all with $include "windowssdk.inc"

Paul.
Ionic Wind Support Team

Raid

Paul, if you include everything with the include statement, but not use all of the subroutines available as a result, does the compiler still place them into the executable?
Proudly licensed EBASIC owner since Feb 2009. Network library present!

EvangelMike

Paul, Greetings! I placed $include "C:\Program Files\EBDev\include\windowssdk.inc" as you suggested as the first line of my source file TestPassVars.eba, and then did a Build > Build Single. The compiler output was:

Compiling...
TestPassVars.eba
No Errors
Generating Exports

Linking...
Emergence Linker v1.11 Copyright ÂÃ,© 2006 Ionic Wind Software
Generating C:\ExcelDLLs\TestPassVars.dll
Error: Unable to open output file C:\ExcelDLLs\TestPassVars.dll
Error(s) in linking C:\ExcelDLLs\TestPassVars.dll


What is the best way of proceeding. Thanks! May you have a blessed day.

Sincerely,

Michael D Fitzpatrick

Ionic Wind Support Team

Reboot your computer, or close Excel.  Either Excel never released the DLL the last time it was used, or Windows still has a file lock on it.  Common problem, easy solution. 

When a program loads a DLL, either dynamically or statically, Windows keeps a reference count on the DLL. The DLL itself remains read-only until all programs using the DLL release their lock on it. Kind of unusual if your using XP, more common with Vista and the older 9x OS's.  So the linker can't open the file to write over it. 

Keep notes.  You'll need to remember all of this as you progress with your learning.

Paul.
Ionic Wind Support Team

Ionic Wind Support Team

Quote from: Raid on March 05, 2009, 07:23:02 PM
Paul, if you include everything with the include statement, but not use all of the subroutines available as a result, does the compiler still place them into the executable?


There shouldn't be any subroutines in the Windows headers.  The linker uses an object file reference count to do exclusions anyway.  Meaning if none of the subroutines/globals in a particular object file is reference then that object file is not included in the final executable.

Which is why I have always stressed the proper use of projects.

Paul.
Ionic Wind Support Team

EvangelMike

Thanks Paul. After I rebooted the computer, the Emergence Basic source compiled and linked without errors to produce a DLL. My next step is passing variables to the DLL. Simple variables pass correctly, but arrays still will not pass correctly. I was wondering if anyone on the list has developed VBA code or includes or add-ins or a procedure to facilitate passing SAFEARRAYS to a DLL. If not, I will have to continue reaiding "Financial Applications using Excel Add-in Development in C/C++" (I am only up to page 81--it is a long road ahead, unless someone on the list has worked with this kind of problem before.) The code of my Excel Sub follows:

Option Base 0
Option Explicit
Public Declare Sub TestPassVars Lib "C:\ExcelDLLs\TestPassVars.dll" (ByRef MaxInsInv As Double, ByRef SrCount As Double, ByRef K As Long, ByRef InsiderInv() As Double, ByRef InsiderJrSr() As String, ByRef LstRowData As Long)
Sub ChkPassVars()

Dim K As Long
Dim MaxInsInv As Double
Dim SrCount As Double
Dim InsiderInv(0 To 100) As Double
Dim InsiderJrSr(0 To 100) As String
Dim LstRowData As Long

K = 4
MaxInsInv = 123321#
InsiderInv(0) = 12333#
InsiderJrSr(0) = "xc"
LstRowData = 5400
SrCount = 3.5

Call TestPassVars(MaxInsInv, SrCount, K, InsiderInv(), InsiderJrSr(), LstRowData)

End Sub

May you have a blessed day.

Sincerely,

Michael D Fitzpatrick