Just load `libmsg.so` and get the address of the symbols that you need.
If `libmsg.so` depends on `libnet.so` then the OS loader (`ld`) should load
automatically `libnet.so` if `libmsg.so` is implicitly linked with `libnet.so`
(you can check the `.dynamic` section of `libmsg.so` with `readelf` (
It's normal, if you compile the DLL with `--noMain` then the function DllMain()
is not created and the Nim system is not initializated calling NimMain() in
DllMain() and the app crashes.
If you compile the DLL **without** `--noMain` it generates this initialization
code and NimMain() is called
OK, it's done.
Hello,
The documentation of **moveFile** says _" If dest already exists, it will be
overwritten"_, but it raises an exception:
.nim(94)raiseOSError
Error: unhandled exception: No se puede crear un archivo que ya existe.
Additional info: "(\"b86257abd65a5deb.tmp\"
I've made several tests and the suggestion of @Hlaaftana works very well,
thanks!
proc encrypter*(data: string or seq or array, key: string): typeof(data) =
Run
Thanks you for your replies.
> So I think there is no solution for you. Can you tell us what you want to
> archive?
Yes, I've made a little XOR encrypter/decrypter for strings, seqs and arrays.
It works perfectly but I was wondering if it was possible to do it using only
one function instead o
Hello,
Suppose this pseudo function:
proc fn[T](x: openarray[T]): ?
Run
Here **x** can be a string, a seq or an array, right?
Is there any way to return a string when **x** is a string, a seq when **x** is
a seq and an array when **x** is an array?
Thank you.
Thank you.
Wouldn't be a good idea to expand internally a convertible type like
_openarray_ before matching? For example, expand **test[T](x: openarray[T])**
as **test[T](x: (seq|array)[T])**
And maybe create also a priority queue to try to match first with non-generic
functions, and then try
Thank you Jester. But I meant if it's possible keep both functions, similar to
template specialization for function overloading in C++. I think the Nim
compiler should make the call to the second "test" proc as a specialization of
the first proc, no?
Hi,
Is there any way in Nim to solve this? Or is a bug?
proc test[T](x: T) =
echo x
proc test[T](x: openarray[T]) =
for i in x:
echo i
test([1, 2, 3])
It does not compile because the first "test" proc is called instead of the
second.
10 matches
Mail list logo