Creating a LIB or DLL
- Dave Zowasky
- Posts: 125
- Joined: Wed Oct 19, 2005 2:28 pm
- Location: Hudson Ohio
- Contact:
Re: Creating a LIB or DLL
Enrico,
Thanks for the advice, I made sure the bcc32.cfg and ilink32.cfg were set up and it works great.
Thnaks again
Thanks for the advice, I made sure the bcc32.cfg and ilink32.cfg were set up and it works great.
Thnaks again
Dave Zowasky
Com1 Software, Inc.
http://www.com1software.com
information@com1software.com
330 653-3771
Com1 Software, Inc.
http://www.com1software.com
information@com1software.com
330 653-3771
- Dave Zowasky
- Posts: 125
- Joined: Wed Oct 19, 2005 2:28 pm
- Location: Hudson Ohio
- Contact:
Re: Creating a LIB or DLL
Antonio,
I copied the newly created harbor.exe's to my harbour folder and verified I have current results.
Thanks
I copied the newly created harbor.exe's to my harbour folder and verified I have current results.
Thanks
Dave Zowasky
Com1 Software, Inc.
http://www.com1software.com
information@com1software.com
330 653-3771
Com1 Software, Inc.
http://www.com1software.com
information@com1software.com
330 653-3771
- Antonio Linares
- Site Admin
- Posts: 42607
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 47 times
- Been thanked: 88 times
- Contact:
Re: Creating a LIB or DLL
Dave,
I understand that you mean that with the new created Harbour you keep having the exception, right ?
Have you rebuilt the DLL and the EXE with the new created Harbour ?
I understand that you mean that with the new created Harbour you keep having the exception, right ?
Have you rebuilt the DLL and the EXE with the new created Harbour ?
- Dave Zowasky
- Posts: 125
- Joined: Wed Oct 19, 2005 2:28 pm
- Location: Hudson Ohio
- Contact:
Re: Creating a LIB or DLL
Antonio,
Correct, I still have the exception.
I have not added any traces to the VMinit to look deeper.
Thanks
Correct, I still have the exception.
I have not added any traces to the VMinit to look deeper.
Thanks
Dave Zowasky
Com1 Software, Inc.
http://www.com1software.com
information@com1software.com
330 653-3771
Com1 Software, Inc.
http://www.com1software.com
information@com1software.com
330 653-3771
- Antonio Linares
- Site Admin
- Posts: 42607
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 47 times
- Been thanked: 88 times
- Contact:
Re: Creating a LIB or DLL
Dave,
Ok, now in Harbour\source\vm\hvm.c function hb_vmInit() please place some traces and rebuild Harbour again and rebuild the DLL and the EXE:
and so on, so we can detect where the exception is coming from.
Ok, now in Harbour\source\vm\hvm.c function hb_vmInit() please place some traces and rebuild Harbour again and rebuild the DLL and the EXE:
Code: Select all | Expand
...#include <windows.h> // new !!! void hb_vmInit( BOOL bStartMainProc ){ HB_TRACE(HB_TR_DEBUG, ("hb_vmInit()")); MessageBox( 0, "before hb_xinit()", "ok", 0 ); // New !!! hb_xinit(); MessageBox( 0, "after hb_xinit()", "ok", 0 ); // New !!! MessageBox( 0, "before hb_vmSetExceptionHandler()", "ok", 0 ); // New !!! hb_vmSetExceptionHandler(); MessageBox( 0, "after hb_vmSetExceptionHandler()", "ok", 0 ); // New !!! MessageBox( 0, "before hb_vmSymbolInit_RT()", "ok", 0 ); // New !!! hb_vmSymbolInit_RT(); /* initialize symbol table with runtime support functions */ MessageBox( 0, "after hb_vmSymbolInit_RT()", "ok", 0 ); // New !!! MessageBox( 0, "before hb_stackInit()", "ok", 0 ); // New !!! hb_stackInit(); /* initialize HVM stack */ MessageBox( 0, "after hb_stackInit()", "ok", 0 ); // New !!! ...
and so on, so we can detect where the exception is coming from.
- Dave Zowasky
- Posts: 125
- Joined: Wed Oct 19, 2005 2:28 pm
- Location: Hudson Ohio
- Contact:
Re: Creating a LIB or DLL
Antonio,
I keep getting compile error
Error: Unresolved external '_MessageBox' referenced from C:\HS\HARBOUR\LIB\WIN\BCC\HBVM.LIB|hvm
also this is how the initstack is.
Thanks
I keep getting compile error
Error: Unresolved external '_MessageBox' referenced from C:\HS\HARBOUR\LIB\WIN\BCC\HBVM.LIB|hvm
also this is how the initstack is.
Code: Select all | Expand
#if defined( HB_MT_VM ) hb_threadInit(); hb_vmStackInit( hb_threadStateNew() ); /* initialize HVM thread stack */ s_pSymbolsMtx = hb_threadMutexCreate( FALSE );#else hb_stackInit(); /* initialize HVM stack */#endif
Thanks
Dave Zowasky
Com1 Software, Inc.
http://www.com1software.com
information@com1software.com
330 653-3771
Com1 Software, Inc.
http://www.com1software.com
information@com1software.com
330 653-3771
- Antonio Linares
- Site Admin
- Posts: 42607
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 47 times
- Been thanked: 88 times
- Contact:
Re: Creating a LIB or DLL
Dave,
> Error: Unresolved external '_MessageBox' referenced from C:\HS\HARBOUR\LIB\WIN\BCC\HBVM.LIB|hvm
Do you get that error when building your DLL ? Or when you rebuild Harbour ?
Have you included #include <windows.h> inside hvm.c as I shown you ?
> also this is how the initstack is.
> #if defined( HB_MT_VM )
That define is for multithreading and we are not going to use it for now, thats why you can place the trace in the #else section.
> Error: Unresolved external '_MessageBox' referenced from C:\HS\HARBOUR\LIB\WIN\BCC\HBVM.LIB|hvm
Do you get that error when building your DLL ? Or when you rebuild Harbour ?
Have you included #include <windows.h> inside hvm.c as I shown you ?
> also this is how the initstack is.
> #if defined( HB_MT_VM )
That define is for multithreading and we are not going to use it for now, thats why you can place the trace in the #else section.
- Dave Zowasky
- Posts: 125
- Joined: Wed Oct 19, 2005 2:28 pm
- Location: Hudson Ohio
- Contact:
Re: Creating a LIB or DLL
Antonio,
Yes, I forgot the #include <windows.h> inside hvm.c
I put it in there and still having some sort of problems.
When I added the messages in the HVM I was still not hitting them
To be sure I started over fresh with no changes
I noticed this in my log
-+thread.obj &
-+vm.obj &
-+harbinit.obj &
-+
Warning: 'hvm' not found in library
Warning: 'arrays' not found in library
Warning: 'arrayshb' not found in library
Warning: 'asort' not found in library
Warning: 'break' not found in library
Warning: 'classes' not found in library
Warning: 'cmdarg' not found in library
Warning: 'debug' not found in library
Warning: 'dynlibhb' not found in library
Warning: 'dynsym' not found in library
Warning: 'codebloc' not found in library
Warning: 'estack' not found in library
Warning: 'eval' not found in library
Warning: 'evalhb' not found in library
Warning: 'extend' not found in library
Warning: 'extrap' not found in library
Warning: 'fm' not found in library
Warning: 'garbage' not found in library
Warning: 'hashes' not found in library
Warning: 'hashfunc' not found in library
Warning: 'initexit' not found in library
Warning: 'initsymb' not found in library
Warning: 'itemapi' not found in library
Warning: 'macro' not found in library
Warning: 'mainstd' not found in library
Warning: 'mainwin' not found in library
Warning: 'memvars' not found in library
Warning: 'memvclip' not found in library
Warning: 'pcount' not found in library
Warning: 'proc' not found in library
Warning: 'pvalue' not found in library
Warning: 'runner' not found in library
Warning: 'set' not found in library
Warning: 'thread' not found in library
Warning: 'vm' not found in library
Warning: 'harbinit' not found in library
mingw32-make.exe[3]: Leaving directory `C:/hs/harbour/source/vm/win/bcc'
mingw32-make.exe -C mainstd
mingw32-make.exe[3]: Entering directory `C:/hs/harbour/source/vm/mainstd'
I am still creating a harbour.exe
Any ideas?
Yes, I forgot the #include <windows.h> inside hvm.c
I put it in there and still having some sort of problems.
When I added the messages in the HVM I was still not hitting them
To be sure I started over fresh with no changes
I noticed this in my log
-+thread.obj &
-+vm.obj &
-+harbinit.obj &
-+
Warning: 'hvm' not found in library
Warning: 'arrays' not found in library
Warning: 'arrayshb' not found in library
Warning: 'asort' not found in library
Warning: 'break' not found in library
Warning: 'classes' not found in library
Warning: 'cmdarg' not found in library
Warning: 'debug' not found in library
Warning: 'dynlibhb' not found in library
Warning: 'dynsym' not found in library
Warning: 'codebloc' not found in library
Warning: 'estack' not found in library
Warning: 'eval' not found in library
Warning: 'evalhb' not found in library
Warning: 'extend' not found in library
Warning: 'extrap' not found in library
Warning: 'fm' not found in library
Warning: 'garbage' not found in library
Warning: 'hashes' not found in library
Warning: 'hashfunc' not found in library
Warning: 'initexit' not found in library
Warning: 'initsymb' not found in library
Warning: 'itemapi' not found in library
Warning: 'macro' not found in library
Warning: 'mainstd' not found in library
Warning: 'mainwin' not found in library
Warning: 'memvars' not found in library
Warning: 'memvclip' not found in library
Warning: 'pcount' not found in library
Warning: 'proc' not found in library
Warning: 'pvalue' not found in library
Warning: 'runner' not found in library
Warning: 'set' not found in library
Warning: 'thread' not found in library
Warning: 'vm' not found in library
Warning: 'harbinit' not found in library
mingw32-make.exe[3]: Leaving directory `C:/hs/harbour/source/vm/win/bcc'
mingw32-make.exe -C mainstd
mingw32-make.exe[3]: Entering directory `C:/hs/harbour/source/vm/mainstd'
I am still creating a harbour.exe
Any ideas?
Dave Zowasky
Com1 Software, Inc.
http://www.com1software.com
information@com1software.com
330 653-3771
Com1 Software, Inc.
http://www.com1software.com
information@com1software.com
330 653-3771
- Dave Zowasky
- Posts: 125
- Joined: Wed Oct 19, 2005 2:28 pm
- Location: Hudson Ohio
- Contact:
Re: Creating a LIB or DLL
Antonio,
I have copied .bat .mak and .sh files
from my \harbour-1.0.1\contrib folder to my c:\hs\harbour folder
My make_b32.bat
when I run my makeb32.bat I get
MAKE Version 5.2 Copyright (c) 1987, 2000 Borland
Fatal: Unable to open makefile
in my make_b32.log. Should I be passing it any parameters?
Thanks
I have copied .bat .mak and .sh files
from my \harbour-1.0.1\contrib folder to my c:\hs\harbour folder
My make_b32.bat
Code: Select all | Expand
@echo offremrem $Id: make_b32.bat 7995 2007-11-19 14:13:53Z vszakats $remcall mtpl_b32.bat %1 %2 %3 %4 %5 %6 %7 %8 %9
when I run my makeb32.bat I get
MAKE Version 5.2 Copyright (c) 1987, 2000 Borland
Fatal: Unable to open makefile
in my make_b32.log. Should I be passing it any parameters?
Thanks
Dave Zowasky
Com1 Software, Inc.
http://www.com1software.com
information@com1software.com
330 653-3771
Com1 Software, Inc.
http://www.com1software.com
information@com1software.com
330 653-3771
- Antonio Linares
- Site Admin
- Posts: 42607
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 47 times
- Been thanked: 88 times
- Contact:
Re: Creating a LIB or DLL
Dave,
> I am still creating a harbour.exe
If you previously delete harbour.exe and all the Harbour LIBs, do they get built again ?
> I am still creating a harbour.exe
If you previously delete harbour.exe and all the Harbour LIBs, do they get built again ?
- Dave Zowasky
- Posts: 125
- Joined: Wed Oct 19, 2005 2:28 pm
- Location: Hudson Ohio
- Contact:
Re: Creating a LIB or DLL
Antonio,
Maybe some progress.
I copied files from \harboursource\harbour-1.0.1\
to my \hs\harbour folder
now when I run makeb32.bat I get:
MAKE Version 5.2 Copyright (c) 1987, 2000 Borland
Borland C++ 5.5 for Win32 Copyright (c) 1993, 2000 Borland
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Error: Unresolved external '_hb_snprintf' referenced from C:\HS\HARBOUR\LIB\B32\HBCOMMON.LIB|hbver
** error 1 ** deleting bin\b32\hbpp.exe
No EXE's created
Thanks
Maybe some progress.
I copied files from \harboursource\harbour-1.0.1\
to my \hs\harbour folder
now when I run makeb32.bat I get:
MAKE Version 5.2 Copyright (c) 1987, 2000 Borland
Borland C++ 5.5 for Win32 Copyright (c) 1993, 2000 Borland
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Error: Unresolved external '_hb_snprintf' referenced from C:\HS\HARBOUR\LIB\B32\HBCOMMON.LIB|hbver
** error 1 ** deleting bin\b32\hbpp.exe
No EXE's created
Thanks
Dave Zowasky
Com1 Software, Inc.
http://www.com1software.com
information@com1software.com
330 653-3771
Com1 Software, Inc.
http://www.com1software.com
information@com1software.com
330 653-3771
- Antonio Linares
- Site Admin
- Posts: 42607
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 47 times
- Been thanked: 88 times
- Contact:
Re: Creating a LIB or DLL
Dave,
I just followed Enrico's instructions and Harbour EXEs and LIBs were properly built on first try:
1. I did a checkout on a clean directory as I explained you in this thread.
2. I created a makeb32.bat in the same path where make_gnu.bat is with these contents:
3. I run makeb32.bat and got everything properly built
I just followed Enrico's instructions and Harbour EXEs and LIBs were properly built on first try:
1. I did a checkout on a clean directory as I explained you in this thread.
2. I created a makeb32.bat in the same path where make_gnu.bat is with these contents:
Code: Select all | Expand
@ ECHO OFFSET PATH=c:\bcc55\bin;c:\mingw\bin;%PATH%SET HB_COMPILER=bccSET HB_USER_CFLAGS=-DHB_FM_STATISTICS_OFFmake_gnu clean install > make_gnu.log 2>&1
3. I run makeb32.bat and got everything properly built

- Dave Zowasky
- Posts: 125
- Joined: Wed Oct 19, 2005 2:28 pm
- Location: Hudson Ohio
- Contact:
Re: Creating a LIB or DLL
Antonio,
I have separated my makegnu.bat from my other makeb32.bat in my hs folder and have
put it in my hs1 folder. It does build for me too. I am going to start over with makeb32.bat in a fresh
folder.
My current makegnu.bat
Here is what I have in the hvm.c file.
I see a lot of this in my make_gnu.log.
I cannot seem to hit the messagebox in the VMinit()
I still get the exception before I hit the new before vminit messagebox
Thanks
I have separated my makegnu.bat from my other makeb32.bat in my hs folder and have
put it in my hs1 folder. It does build for me too. I am going to start over with makeb32.bat in a fresh
folder.
My current makegnu.bat
Code: Select all | Expand
del \hs1\harbour\bin\*.exedel \harbour\*.exeSET PATH=c:\bcc55\binSET HB_COMPILER=bccSET HB_USER_CFLAGS=-DHB_FM_STATISTICS_OFFmake_gnu clean install > make_gnu.log 2>&1copy \hs1\harbour\bin\*.exe \harbour\bin\
Here is what I have in the hvm.c file.
Code: Select all | Expand
/* application entry point */#include <windows.h> // new !!!void hb_vmInit( BOOL bStartMainProc ){ HB_TRACE(HB_TR_DEBUG, ("hb_vmInit()")); MessageBox( 0, "before hb_xinit()", "ok", 0 ); // New !!! hb_xinit(); MessageBox( 0, "after hb_xinit()", "ok", 0 ); // New !!! hb_vmSetExceptionHandler(); hb_vmSymbolInit_RT(); /* initialize symbol table with runtime support functions */#if defined( HB_MT_VM ) hb_threadInit(); hb_vmStackInit( hb_threadStateNew() ); /* initialize HVM thread stack */ s_pSymbolsMtx = hb_threadMutexCreate( FALSE );#else hb_stackInit(); /* initialize HVM stack */#endif
I see a lot of this in my make_gnu.log.
Code: Select all | Expand
-+genhrb.obj & -+hbcmplib.obj & -+hbcomp.obj & -+hbdbginf.obj & -+hbfunchk.obj & -+hbgenerr.obj & -+hbpcode.obj & -+hbfix.obj & -+hbdead.obj & -+hblbl.obj & -+hbopt.obj & -+hbstripl.obj & -+hbusage.obj & -+hbident.obj & -+ppcomp.obj & -+expropta.obj & -+exproptb.obj & -+complex.obj & -+compi18n.obj & -+hbmain.obj & -+Warning: 'harboury' not found in libraryWarning: 'cmdcheck' not found in libraryWarning: 'genc' not found in libraryWarning: 'gencc' not found in libraryWarning: 'gencobj' not found in libraryWarning: 'genhrb' not found in libraryWarning: 'hbcmplib' not found in libraryWarning: 'hbcomp' not found in libraryWarning: 'hbdbginf' not found in libraryWarning: 'hbfunchk' not found in libraryWarning: 'hbgenerr' not found in libraryWarning: 'hbpcode' not found in libraryWarning: 'hbfix' not found in libraryWarning: 'hbdead' not found in libraryWarning: 'hblbl' not found in libraryWarning: 'hbopt' not found in libraryWarning: 'hbstripl' not found in libraryWarning: 'hbusage' not found in libraryWarning: 'hbident' not found in libraryWarning: 'ppcomp' not found in libraryWarning: 'expropta' not found in libraryWarning: 'exproptb' not found in libraryWarning: 'complex' not found in libraryWarning: 'compi18n' not found in libraryWarning: 'hbmain' not found in library
I cannot seem to hit the messagebox in the VMinit()
I still get the exception before I hit the new before vminit messagebox
Thanks
Dave Zowasky
Com1 Software, Inc.
http://www.com1software.com
information@com1software.com
330 653-3771
Com1 Software, Inc.
http://www.com1software.com
information@com1software.com
330 653-3771
- Antonio Linares
- Site Admin
- Posts: 42607
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 47 times
- Been thanked: 88 times
- Contact:
Re: Creating a LIB or DLL
Dave,
But you said that you: "Made it to before VMinit"
Has that changed ?
What MessageBox prompt do you see before the exception ?
But you said that you: "Made it to before VMinit"
Has that changed ?
What MessageBox prompt do you see before the exception ?
- Dave Zowasky
- Posts: 125
- Joined: Wed Oct 19, 2005 2:28 pm
- Location: Hudson Ohio
- Contact:
Re: Creating a LIB or DLL
Antonio,
I am able to get the before vminit in the maindll.c not the one before in the hvm.c
Thanks
I am able to get the before vminit in the maindll.c not the one before in the hvm.c
Thanks
Dave Zowasky
Com1 Software, Inc.
http://www.com1software.com
information@com1software.com
330 653-3771
Com1 Software, Inc.
http://www.com1software.com
information@com1software.com
330 653-3771