Author Topic: Constructor?  (Read 4476 times)

0 Members and 1 Guest are viewing this topic.

Offline Paul

  • Pentium
  • *****
  • Posts: 1490
  • Karma: 47
    • View Profile
Constructor?
« on: March 23, 2007 »
How do i declare a constructor?
this is my try and it doesn't work :(

Code: [Select]

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:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: Constructor?
« Reply #1 on: March 23, 2007 »
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:

Offline Paul

  • Pentium
  • *****
  • Posts: 1490
  • Karma: 47
    • View Profile
Re: Constructor?
« Reply #2 on: March 23, 2007 »
Just needed the cvs version :)

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

Offline rdc

  • Pentium
  • *****
  • Posts: 1495
  • Karma: 140
  • Yes, it is me.
    • View Profile
    • Clark Productions
Re: Constructor?
« Reply #3 on: March 23, 2007 »
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.

Offline Paul

  • Pentium
  • *****
  • Posts: 1490
  • Karma: 47
    • View Profile
Re: Constructor?
« Reply #4 on: March 23, 2007 »
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-->

Code: [Select]
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)



« Last Edit: March 23, 2007 by Paul »
I will bite you - http://s5.bitefight.se/c.php?uid=31059
Challenge Trophies Won:

Offline rdc

  • Pentium
  • *****
  • Posts: 1495
  • Karma: 140
  • Yes, it is me.
    • View Profile
    • Clark Productions
Re: Constructor?
« Reply #5 on: March 24, 2007 »
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).

Offline Paul

  • Pentium
  • *****
  • Posts: 1490
  • Karma: 47
    • View Profile
Re: Constructor?
« Reply #6 on: March 24, 2007 »
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:

Offline rdc

  • Pentium
  • *****
  • Posts: 1495
  • Karma: 140
  • Yes, it is me.
    • View Profile
    • Clark Productions
Re: Constructor?
« Reply #7 on: March 24, 2007 »
It might have been that you didn't have all the libs you needed in your first install. Glad you got it working.

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: Constructor?
« Reply #8 on: March 24, 2007 »
Ditto what rdc said :) Nice to know you're up and running mate.
Shockwave ^ Codigos
Challenge Trophies Won: