• Welcome to Dark Bit Factory & Gravity.
 

Constructor?

Started by Paul, March 23, 2007

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Paul

How do i declare a constructor?
this is my try and it doesn't work :(



type thing
    Declare Constructor()
   
end type

constructor thing
   
end constructor


I will bite you - http://s5.bitefight.se/c.php?uid=31059
Challenge Trophies Won:

Shockwave

Aha, you should read this great tutorial by our very own RDC http://dbfinteractive.com/index.php?cat=157 Hope that helps, any questions please post :D
Shockwave ^ Codigos
Challenge Trophies Won:

Paul

#2
Just needed the cvs version :)

Edit: does this work with Tiny PTC ?? and if so, do i need to reinstall it?
I will bite you - http://s5.bitefight.se/c.php?uid=31059
Challenge Trophies Won:

rdc

tinyptc doesn't work with the CVS version. You'll need to get RBraz's tinyptc_ext. That works just fine with the CVS version.

Paul

#4
I tried and got a long list of errors, is there anything special to think about?

Here is the error list if anyone is interested.

Edit: the error log diddn't update: new log-->


Command executed:
"C:\Program Files\FreeBasic\fbc.exe" "C:\Documents and Settings\david1.DAVID\Desktop\paul\freebasic\fire\FBIDETEMP.bas"

Command executed:
"C:\Program Files\FreeBasic\fbc.exe" "C:\Documents and Settings\david1.DAVID\Desktop\paul\freebasic\fire\firebeta.bas"

Compiler output:
C:\Documents and Settings\david1.DAVID\Desktop\paul\freebasic\fire\firebeta.o:fake:(.text+0x72): undefined reference to `ptc_open'
C:\Documents and Settings\david1.DAVID\Desktop\paul\freebasic\fire\firebeta.o:fake:(.text+0x8f): undefined reference to `ptc_update'
C:\Documents and Settings\david1.DAVID\Desktop\paul\freebasic\fire\firebeta.o:fake:(.text+0xa5): undefined reference to `ptc_close'

Results:
Compilation failed

System:
FBIde: 0.4.6
fbc:   FreeBASIC Compiler - Version 0.17 (03-23-2007) for win32 (target:win32)
OS:    Windows 2000 (build 2195, Service Pack 4)




I will bite you - http://s5.bitefight.se/c.php?uid=31059
Challenge Trophies Won:

rdc

These are linker errors; the linker couldn't find the library. Make sure you put the .bi file in the inc folder, and the .a in the lib\win32 folder (if you are on windows).

Paul

Tried reinstalling tinyPTC and tinyptc_ext, that didn't work. but when i reinstalled freebasic, updated and then installed tinyptc_ext then i got i t to work

Thx for all the hwlp shocky and rdc :)

really appreciated :D
I will bite you - http://s5.bitefight.se/c.php?uid=31059
Challenge Trophies Won:

rdc

It might have been that you didn't have all the libs you needed in your first install. Glad you got it working.

Shockwave

Ditto what rdc said :) Nice to know you're up and running mate.
Shockwave ^ Codigos
Challenge Trophies Won: