how to create the library files in jBASE4.0 NT?
- malai
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 509
- Thank you received: 11
19 years 5 months ago #1818
by malai
how to create the library files in jBASE4.0 NT? was created by malai
Hi All,
To create library files,
In jBASE4.0 UNIX, we all know that we can use jbc and jBuildSLib command as follows
-->jbc -c MyRoutine.b -o MyRoutine.o
-->jBuildSLib -o libMyLib MyRoutine.o
Copy the library files into jBASE library path and we can link into any jBASE program as follows
-->jbc -c MyProgram.b -L/usr/jbc/lib -lMyLib -o MyProgram
In jBASE4.0 NT, do any one know how to create the library files?
_________________
M A L A I
To create library files,
In jBASE4.0 UNIX, we all know that we can use jbc and jBuildSLib command as follows
-->jbc -c MyRoutine.b -o MyRoutine.o
-->jBuildSLib -o libMyLib MyRoutine.o
Copy the library files into jBASE library path and we can link into any jBASE program as follows
-->jbc -c MyProgram.b -L/usr/jbc/lib -lMyLib -o MyProgram
In jBASE4.0 NT, do any one know how to create the library files?
_________________
M A L A I
Please Log in or Create an account to join the conversation.
- KingArthur
- Offline
- Senior Member
-
Less
More
- Posts: 75
- Thank you received: 1
19 years 5 months ago #1819
by KingArthur
Replied by KingArthur on topic how to create the library files in jBASE4.0 NT?
Hi Malai,
I am also trying the same and got some thing new.
This is my subroutine, which I need to create the library
File . , Record 'ADD.NUM.b'
Command->
001 SUBROUTINE ADD.NUM.b
002 PRINT 'HELLO IAM INSIDE SUBROUITNE'
003 RETURN
004 END
Compilation
-->jbc -c ADD.NUM.b
ADD.NUM.o created successfully. I think it should be .obj, but in my machine it created as .o itself.
Creating Library
-->jBuildSLib -o libMyLib ADD.NUM.o
These are the files created.
libMyLib.def
libMyLib.dll
libMyLib.exp
libMyLib.lib
I copied all these files into C:JBASE40lib
This is my program, which uses the above subroutine
File . , Record 'MY.PROGRAM.b'
Command->
001 PROGRAM MY.PROGRAM.b
002 CALL ADD.NUM
003 STOP
Compilation
-->jbc -c MY.PROGRAM.b -LC:JBASE40lib -lmylib
out.exe file created successfully. But when I tried to execute it throws SUBROUTINE_CALL_FAIL error
-->out.exe
** Error [ SUBROUTINE_CALL_FAIL ] **
Unable to perform CALL to subroutine ADD.NUM , Line 2 , Source MY.PROGRAM.b
Press C to continue or Q to quit
Trap from an error message, error message name = SUBROUTINE_CALL_FAIL
Source changed to .MY.PROGRAM.b
0002 CALL ADD.NUM
jBASE debugger->
_________________
King Arthur
I am also trying the same and got some thing new.
This is my subroutine, which I need to create the library
File . , Record 'ADD.NUM.b'
Command->
001 SUBROUTINE ADD.NUM.b
002 PRINT 'HELLO IAM INSIDE SUBROUITNE'
003 RETURN
004 END
Compilation
-->jbc -c ADD.NUM.b
ADD.NUM.o created successfully. I think it should be .obj, but in my machine it created as .o itself.
Creating Library
-->jBuildSLib -o libMyLib ADD.NUM.o
These are the files created.
libMyLib.def
libMyLib.dll
libMyLib.exp
libMyLib.lib
I copied all these files into C:JBASE40lib
This is my program, which uses the above subroutine
File . , Record 'MY.PROGRAM.b'
Command->
001 PROGRAM MY.PROGRAM.b
002 CALL ADD.NUM
003 STOP
Compilation
-->jbc -c MY.PROGRAM.b -LC:JBASE40lib -lmylib
out.exe file created successfully. But when I tried to execute it throws SUBROUTINE_CALL_FAIL error
-->out.exe
** Error [ SUBROUTINE_CALL_FAIL ] **
Unable to perform CALL to subroutine ADD.NUM , Line 2 , Source MY.PROGRAM.b
Press C to continue or Q to quit
Trap from an error message, error message name = SUBROUTINE_CALL_FAIL
Source changed to .MY.PROGRAM.b
0002 CALL ADD.NUM
jBASE debugger->
_________________
King Arthur
Please Log in or Create an account to join the conversation.
- malai
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 509
- Thank you received: 11
19 years 5 months ago #1820
by malai
Replied by malai on topic how to create the library files in jBASE4.0 NT?
Hi,
The same above steps is working perfectly on UNIX,
but y not working on windows. Its really strange one.
Lets try to do more research on this.
_________________
M A L A I
The same above steps is working perfectly on UNIX,
but y not working on windows. Its really strange one.
Lets try to do more research on this.
_________________
M A L A I
Please Log in or Create an account to join the conversation.
- malai
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 509
- Thank you received: 11
19 years 5 months ago #1821
by malai
Replied by malai on topic how to create the library files in jBASE4.0 NT?
Yes, I got it...
Here it goes....
Subroutine 1 (ADD_NUM.b)
SUBROUTINE ADD_NUM(N1,N2)
N3 = N1 + N2
PRINT N3
RETURN
END
Subroutine 2 (MUL_NUM.b)
SUBROUTINE MUL_NUM(N1,N2)
N3 = N1 * N2
PRINT N3
RETURN
END
Compilation
-->jbc -c ADD_NUM.b
-->jbc -c MUL_NUM.b
Once the compiation is success you can able to see 2 object files ADD_NUM.o and MUL_NUM.o
Archive the objects
-->ar rv myArchive.lib ADD_NUM.o
-->ar rv myArchive.lib MUL_NUM.o
Creating Libraries
-->jBuildSLib -o libMyLib myArchive.lib
Once this is success you can able to see the following files
libMyLib.def, libMyLib.dll,libMyLib.explibMyLib.lib
Move all the above files to jBASE library path (C:JBASE40lib)
Main Line Program
PROGRAM MAIN
CALL ADD_NUM(10,20)
CALL MUL_NUM(20,20)
STOP
Compile the Program
-->jbc MAIN.b -o MAIN
Execute the Program
-->MAIN
30
400
Thats All !!!
_________________
M A L A I
Here it goes....
Subroutine 1 (ADD_NUM.b)
SUBROUTINE ADD_NUM(N1,N2)
N3 = N1 + N2
PRINT N3
RETURN
END
Subroutine 2 (MUL_NUM.b)
SUBROUTINE MUL_NUM(N1,N2)
N3 = N1 * N2
PRINT N3
RETURN
END
Compilation
-->jbc -c ADD_NUM.b
-->jbc -c MUL_NUM.b
Once the compiation is success you can able to see 2 object files ADD_NUM.o and MUL_NUM.o
Archive the objects
-->ar rv myArchive.lib ADD_NUM.o
-->ar rv myArchive.lib MUL_NUM.o
Creating Libraries
-->jBuildSLib -o libMyLib myArchive.lib
Once this is success you can able to see the following files
libMyLib.def, libMyLib.dll,libMyLib.explibMyLib.lib
Move all the above files to jBASE library path (C:JBASE40lib)
Main Line Program
PROGRAM MAIN
CALL ADD_NUM(10,20)
CALL MUL_NUM(20,20)
STOP
Compile the Program
-->jbc MAIN.b -o MAIN
Execute the Program
-->MAIN
30
400
Thats All !!!
_________________
M A L A I
Please Log in or Create an account to join the conversation.
Time to create page: 0.034 seconds