Ok im working on testing the export ability again..
1. The wrapper looks great gernot, very nice looking.
2. I switched to win32-dll, but the file.dll doesnt appear to be visible after compiling(only the gbas is built), what did i do wrong?
I'm finding that with
FUNCTION AddFloat#: var1#, var2#
RETURN var1+var2
ENDFUNCTION
EXPORT AddFloat#
I'm getting :
Warning: unresolved EXPORT: AddFloat#
Warning: unresolved EXPORT: AddFloat#
Wordcount:1 commands
Warning: unresolved EXPORT: AddFloat#
or
gpc_temp1.o:gpc_temp1.cpp:(.text+0x20): multiple definition of `_AddFloat'
gpc_temp0.o:gpc_temp0.cpp:(.text+0xf0): first defined here
depending on whether the # symbol is removed off the function and EXPORT command
It's also creating an exe file, and not DLL...
A.
Confirmed, a # in the function name causes an error.
B.
With your issue for the multi count error....
1. clear your temp dir.
2. put all your exporting functions in a separate file.function.gbas, for the functions exported.
3. go through, and make sure, you are only calling these functions once.
multi-count, I had this problem when i tried to export 40 functions, i accidently had 2 identical calls.
C.
for me, i dont see any dll, no matter what i do..it doesnt seem to be building anything except the wrapper.gbas
The dll should be in the .app directory. It works for me.
Heres a screenshot, options are all correct, nothing is hidden, program is compiled.
dll not present
[attachment deleted by admin]
One thing that will be worth trying is an uninstall & re-install...
No, that didn't solve it either... However, this code was stopping it compiling :
FUNCTION foo:
ENDFUNCTION
INLINE
}
//extern "C" unsigned long GetUserDefaultUILanguage();
namespace __GLBASIC__ {
ENDINLINE
FUNCTION GetLangID%:
INLINE
//return GetUserDefaultUILanguage();
ENDINLINE
ENDFUNCTION
However, commenting everything out doesn't solve it - it appears that no source files are allowed with the WinDLL option, and the only way to get it to compile is to remove the source file. However, whilst compiling & linking succeeded, there is no DLL
Here is a project, a simple one, where no dll is created....i rar the whole directory.
[attachment deleted by admin]
Hi all,
check attachement, works for me
[attachment deleted by admin]
No only the project, compile as DLL
i can Send the compiled project too if you want.
The problem is NO DLL
The wrapper is working fine......there is no driver.dll file created.
test-dll.gbas is just a wrapper...its not the driver.
Download my attachment above, look inside, you will find the entire project, compiled ..
As you can see, a test-dll.gbas is created, but not test.dll
come to chat, i?m online
ok ill brt
Compiled as DLL, hmm have you installed any instance of mingw oder cygwin?
EDIT:// Screenshot
[attachment deleted by admin]
Quotemingw oder cygwin
This is a result of cygwin1.dll search in the harddrive, see untitled.JPG (below my sysinfo)
I saw a dll get compiled a few versions back in time, but not V7.085.
So something is wrong with the editorE.exe maybe?
system info:
EditorE.exe v7.085
GLBasic Precompiler V.7.038
[attachment deleted by admin]
I dont have it installed...
hard drive search results for cygwin1.dll:
5 copies in glbasic compiler directories, as shown in screenshot below:
[attachment deleted by admin]
Ok all fine, sounds like a EditorE bug. We will see what gernot find.
It seems you pressed F8 or F5 to build. That makes a Win32 exe file. Press Shift-F8 and select "Win32-dll". It should build fine then.
Doesn't work Gernot! There is a bug ...
The Shift+F8, and select Win32-DLL works here...
Ok works, was my bad xD
stupid human bugs LMAO
Gernot can you add the shift f8 thing to the export command in the manual? :)
QuoteEXPORT function_name
If you create a DLL, this function will be exposed to the public interface and the wrapper-gbas file will yield it, too.
What exactly does this mean:
'function will be exposed to the public interface 'Does it mean dll will be decompiled into a legible cpp?
No. A dll is sort of an exe file w/o main entry point. But you can have a list of functions that are exposed to a readable interface. Thus, you can dynamically link to these functions and use them as if you linked then into your program in the first place.
Thank you for all that, Gernot.
One more question(for now hehe),
The dll file has internal functions, called by other functions, in the dll.
Is that going to work without wrapping them into the public files?
Or do i need to have those internal system functions wrapped into the readable wrapperdll.gbas too?
ok cool that got rid of all the error messages.
The program starts now...
...and results with a windows error, first thing. :(
check screenshot screenshot.jpg
I need to investigate the exact cause...ill be back.
[attachment deleted by admin]
Could be almost anything :)
Found it....
GETSCREENSIZE and SHOWSCREEN both crashes the dll program.
My api has an internal error checker/messaging system, these 2 commands are needed.
Anyone aware of a workaround?
you can't export GLB intern functions :D
Only Gernot can help you :)
Quote from: Schranz0r on 2009-Aug-20
you can't export GLB intern functions :D
Very funny. :puke:
Is there something that distinguishes commands, as "intern functions" ?
Oh dear. I think I was too quick with the idea that a dll might help. If you use graphics functions, I'm uncertain if they use the same window.
I think what we really need is a safe way for gbal. I see what I can do there. Everything else would just "cripple" the libraray.
Ouch, SpriteZ is crippled. :'(
Well, at least we found some more knowledge, about dll's for GLBasic.
Goodluck with the GBAL thing Gernot.
May the force be with you!