Author Topic: Compiling the source in Windows  (Read 55546 times)

paopao

  • Guest
Compiling the source in Windows
« on: June 26, 2007, 05:45:36 PM »
Hello everybody,

this is my first post and I'd like some help to compile Script Basic source.

I have generated all the header files (.h) as requested, with headerer.pl.

Now  I would like to try to compile scriba.c and I try using either Dev C++ or Visual C++ 6. I can't find any project file so I simply open scriba.c and I try to compile it.

In Dev C++ I get a lot of unreference messages such as:

  [Linker error] undefined reference to `alloc_InitSegment'
  [Linker error] undefined reference to `alloc_Alloc'

for example.

What can I do to sort it out? Is there someone, who can help me please?

Thanks a lot!
Roberto

Support

  • Administrator
  • *****
  • Posts: 19
    • View Profile
Compiling the source in Windows
« Reply #1 on: June 27, 2007, 12:48:56 AM »
Roberto,

Make sure you have Perl installed and run setup.cmd from the source directory in a console window.


John

paopao

  • Guest
Compiling the source in Windows
« Reply #2 on: June 28, 2007, 08:33:59 PM »
Hallo John,

first thanks for your reply. I still have to introduce myself but currently I am pretty busy with personal things...

About compiling Script Basic, I tried with setup.cmd from Windows XP but I get the following message:

"The jamal module esd.pm is not installed..."

Where can I find jamal and esd.pm? I tried here: http://peter.verhas.com/progs/perl/jamal/ but the download page is unavailable.

Also, please, if I want to compile scriba.c, could you give me a list of all files to be included in the project?

Thanks,
Roberto

Quote from: "support"
Roberto,

Make sure you have Perl installed and run setup.cmd from the source directory in a console window.


John

Support

  • Administrator
  • *****
  • Posts: 19
    • View Profile
Compiling the source in Windows
« Reply #3 on: June 29, 2007, 08:39:01 PM »
I just put the 2.1 binaries in the "What's New" section to download. I will have the 2.1 source up soon.

John

paopao

  • Guest
Compiling the source in Windows
« Reply #4 on: July 01, 2007, 07:15:13 PM »
Hi John,

thanks for your replies.

I downloaded the binaries and source code for 2.1.

I have installed jamal.pl, checked the path for the compiler (I currently have free bcc55, vc++ 6 and dev c++) because nmake did not work but when running setup.cmd I still have problems as reported below:

NMAKE : fatal error U1077: 'cl' : return code '0x2'

when using makefile, for every .c file, I also get:

basext.c (just a sample file) : fatal error c1034: stdio.h: no include path set

it looks to me that scriba.exe, sbhttpd.exe, libdscriba.lib and all modules are not created/compiled.

Any advice, help you can offer?

Thanks a lot,
Roberto

Support

  • Administrator
  • *****
  • Posts: 19
    • View Profile
Compiling the source in Windows
« Reply #5 on: July 02, 2007, 01:25:49 AM »
I assume your trying to compile under Windows XP?

Peter (author) compiled the distribution under VS7 if I remember correctly.

try setup --NT on your command line.


John

paopao

  • Guest
Compiling the source in Windows
« Reply #6 on: July 02, 2007, 01:00:33 PM »
Hi John,

well thanks again for your support.

Yes, I have Win XP and VS6. I guess it should compile with not so many hassles :)

I checked and checked the messages I was getting.

The first were about nmake and I downloaded it from MS, then I realised I had it in my VS folder but it was not being executed and it also looked as some files could not be included because their path was not set.

At least I realised that for an unknown reason some variables and paths were not set properly so I used VCVARS32.BAT and things improved a lot.

Some modules cannot be compiled yet but I got scriba.exe and other files in the bin folder.

I'm trying to compile scribacmd. Once again I realised I should include libscriba.lib in the link tab and it looks to me that some functions cannot be called yet (scriba_SetFileName for example). Am I missing something?

By the way, if I may ask you, how do you use ScriptBasic? Embedded in your software or how? Have you added some commands, compiled some source? It would be useful to have some sample projects or part of them in the forum.

As soon as I get some samples working fine and all times I will be more than happy to post mine here.

See you,
Roberto

P.S. Btw there is no need for the --NT option as setup.cmd has only one line: perl setup.pl --nt %*

Support

  • Administrator
  • *****
  • Posts: 19
    • View Profile
Compiling the source in Windows
« Reply #7 on: July 02, 2007, 03:02:50 PM »
I use ScriptBasic scripts on my Linux box to talk to a real estate (MLS) web service to get listing and photo data.

I'm currently working on a Aestiva HTMLOS conversion to the ScriptBasic Application Server. (sbhttpd w/Apache interface)

You might try to get your hands on VS7 and try the compile as that is what the make files are setup for.

BTW: The 2.1 release has everything compiled and ready to run for Windows. Unless you need to enhance the Basic, compiling the source isn't a requirement.

John

Marcel

  • Guest
Compiling the source in Windows
« Reply #8 on: October 30, 2007, 12:54:01 PM »
Hi,

I'm curious how the project is evolving.

Support

  • Administrator
  • *****
  • Posts: 19
    • View Profile
Compiling the source in Windows
« Reply #9 on: October 30, 2007, 12:58:27 PM »
ScriptBasic is a mature / stable offering. It has 10 years of hard work invested by the author. I use it exclusively for all my utility scripting and web projects.

I think you will be very happy with ScriptBasic.


John

Marcel

  • Guest
Compiling the source in Windows
« Reply #10 on: October 30, 2007, 01:36:08 PM »
Hi John,

Thanks for the reply. I was more curious what Roberto made of it. I saw he mentioned some C compilers and read also that Perl is involved.  :(

At the moment I have VS2005  C/C++, VB.Net but I 'like' Pelles C as program more than the VS2005 C.

Does the compiler brand matter in this case?
Is it possible to by-pass the Perl stage?

Support

  • Administrator
  • *****
  • Posts: 19
    • View Profile
Compiling the source in Windows
« Reply #11 on: October 30, 2007, 01:43:01 PM »
Perl is only use as a 'helper' to get ScriptBasic code compiled. Once you have a working ScriptBasic environment, Perl is no longer needed.  It's used for things like taking the source text files and converting the <CR><LF> to <LF> if your compiling the source under *nix.

John

Marcel

  • Guest
Compiling the source in Windows
« Reply #12 on: October 30, 2007, 03:12:08 PM »
Ok, I'm not on linux, so you say that Perl isn't needed on Windows? I first need to dive into the Window info  :)

Thanks so far John.

Zulfi.Ali

  • Guest
Re: Compiling the source in Windows
« Reply #13 on: July 13, 2010, 08:08:03 PM »
Hi,

I have recently downloaded the latest version i.e. 3.0 of ScriptBasic and I find that it is very different from 2.1.  There are no setup.cmd and headerer.pl files etc.

My objective is to embed it in MS VC7 desktop application but even after reading all the forums and documentation, I still am clueless as to how to proceed.  I tried to create a new project along the lines of scribacmd.c but when I included the function scriba_new(), the linker gave the following error.

error LNK2019: unresolved external symbol _scriba_new referenced in function "public: void __thiscall CScriptBasicEmbDlg::OnBnClickedButton1(void)" (?OnBnClickedButton1@CScriptBasicEmbDlg@@QAEXXZ)   ScriptBasicEmbDlg.obj   

I would really appreciate if someone could provide a little help in this regard

Thanks
Zulfiqar

Support

  • Administrator
  • *****
  • Posts: 19
    • View Profile
Re: Compiling the source in Windows
« Reply #14 on: July 13, 2010, 08:42:07 PM »
Welcome to the ScriptBasic forum Zulfiqar.

The ScriptBasic 3.0 Windows version is using MinGW/GCC as the C compiler. If your using the MS VC7 compiler, I suggest that you use the 2.1 version of ScriptBasic. The 3.0 release is focused on a new make file system and using MinGW/GCC for 32/64 compiling.

NOTE: Don't mix libs compiled using different compilers. (linkers complain) VC7 will have the same problem using MinGW/GCC compiled libs. Accessing DLLs compiled by any of the compilers doesn't seem to be an issue.

« Last Edit: July 13, 2010, 08:56:33 PM by support »